Skip to content

Commit

Permalink
Merge branch 'release/42.4.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
alaingilbert committed Sep 5, 2020
2 parents 74f08f6 + 2ff70ef commit df3181e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extracts_v71.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ func extractHighscoreFromDocV71(doc *goquery.Document) (out Highscore, err error

func extractAllResourcesV71(pageHTML []byte) (out map[CelestialID]Resources, err error) {
out = make(map[CelestialID]Resources)
m := regexp.MustCompile(`var planetResources=([^;]+);`).FindSubmatch(pageHTML)
m := regexp.MustCompile(`var planetResources\s?=\s?([^;]+);`).FindSubmatch(pageHTML)
if len(m) != 2 {
return out, errors.New("failed to get resources json")
}
Expand Down
3 changes: 2 additions & 1 deletion ogame.go
Original file line number Diff line number Diff line change
Expand Up @@ -2429,7 +2429,8 @@ func (b *OGame) highscore(category, typ, page int64) (out Highscore, err error)

func (b *OGame) getAllResources() (map[CelestialID]Resources, error) {
vals := url.Values{
"page": {"traderOverview"},
"page": {"ajax"},
"component": {"traderauctioneer"},
}
payload := url.Values{
"show": {"auctioneer"},
Expand Down

0 comments on commit df3181e

Please sign in to comment.