Skip to content

Commit

Permalink
Actually set the Private field on achievement info
Browse files Browse the repository at this point in the history
  • Loading branch information
karashiiro committed Sep 18, 2021
1 parent 370133a commit 0adab20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,11 @@ func (s *Scraper) FetchCharacterAchievements(id uint32) ([]*AchievementInfo, *Al
go func() {
achievementCollector := s.buildAchievementCollector(allAchievementInfo, output, errors)
achievementCollector.OnError(func(r *colly.Response, err error) {
// 403
if err.Error() != http.StatusText(http.StatusForbidden) {
errors <- err
} else {
// 403
allAchievementInfo.Private = true
}
})
achievementCollector.Visit(fmt.Sprintf("https://%s.finalfantasyxiv.com/lodestone/character/%d/achievement/", s.lang, id))
Expand Down

0 comments on commit 0adab20

Please sign in to comment.