Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtractConstructions no longer works since v11.13.0 #148

Open
jsdidierlaurent opened this issue Apr 12, 2024 · 2 comments
Open

ExtractConstructions no longer works since v11.13.0 #148

jsdidierlaurent opened this issue Apr 12, 2024 · 2 comments

Comments

@jsdidierlaurent
Copy link

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 !

@0xE232FE
Copy link
Contributor

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

@alaingilbert
Copy link
Owner

should be fixed in 52.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants