ogame
ogame copied to clipboard
ExtractConstructions no longer works since v11.13.0
Hi!
Since version v11.13.0 the following regex no longer matches results
buildingCountdownMatch := regexp.MustCompile(`var restTimebuilding = (\d+) -`).FindSubmatch(pageHTML)
...
researchCountdownMatch := regexp.MustCompile(`var restTimeresearch = (\d+) -`).FindSubmatch(pageHTML)
...
lfBuildingCountdownMatch := regexp.MustCompile(`var restTimelfbuilding = (\d+) -`).FindSubmatch(pageHTML)
...
lfResearchCountdownMatch := regexp.MustCompile(`var restTimelfresearch = (\d+) -`).FindSubmatch(pageHTML)
...
I think they changed how it works with the new Mechas building queue
Thanks !
You can get the new regexp here https://github.com/0xE232FE/ogame.mod/blob/9ed75aaf095ae7e3c7d31621531a3c6801dcadfd/pkg/extractor/v11_9_0/extracts.go#L195
Example
buildingCountdownMatch := regexp.MustCompile(`new CountdownTimer\('buildingCountdown', (\d+),`).FindSubmatch(pageHTML)```
should be fixed in 52.1.0