ogame icon indicating copy to clipboard operation
ogame copied to clipboard

ExtractConstructions no longer works since v11.13.0

Open jsdidierlaurent opened this issue 10 months ago • 2 comments

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 !

jsdidierlaurent avatar Apr 12 '24 09:04 jsdidierlaurent

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)```

0xE232FE avatar Apr 12 '24 11:04 0xE232FE

should be fixed in 52.1.0

alaingilbert avatar Apr 12 '24 20:04 alaingilbert