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

Fix getVersion discrepancy regex discrepancy #145

Closed

Conversation

HotaruBlaze
Copy link
Contributor

Their was an issue where the multiple regex version checks drifted over time, and their was bad handling, triggering a version prompt incorrectly, this turned out to be because apple changed the html formatting again, as well as regex's being missed overtime

I've replaced all the regex checks with a single function to handle all 3 currently known possibilities of version check.

@spotlightishere
Copy link
Collaborator

spotlightishere commented May 8, 2024

Instead of adding another regex, I wonder if it might make sense instead to use the official iTunes Search API instead of scraping the store page manually. We could search by bundle ID with e.g. https://itunes.apple.com/lookup?bundleId=com.nintendo.znca.

As of writing, this returns a JSON response with similar:

{
	"resultCount": 1,
	"results": [
		{
			// [...]
			"bundleId": "com.nintendo.znca",
			"releaseDate": "2017-07-19T00:57:14Z",
			"version": "2.10.0",
		}
	]
}

This would let us quickly adapt to new versions should their format change further beyond any numerical format.

@HotaruBlaze
Copy link
Contributor Author

This may be worth looking into if we want to automate handling f-api version having to attempt a previous version on failureback, but for now, this was more of a "we know this works, so handle it"

This is more of a hotfix imo, than swapping it out for another solution.

this also concerns me a little

The Search API is limited to approximately 20 calls per minute (subject to change). If you require heavier usage, we suggest you consider using our Enterprise Partner Feed (EPF). If you wish to access content on our EPF, please review [iTunes Affliate Resources](https://affiliate.itunes.apple.com/resources/documentation/itunes-enterprise-partner-feed/) for more information.

but i agree its worth looking into, but for now, NSO-RPC crashes without this code, because the current regex's conflict with eachother, app.py's passes, the api one fails.

@HotaruBlaze
Copy link
Contributor Author

HotaruBlaze commented May 10, 2024

Superseded by #147

@HotaruBlaze HotaruBlaze deleted the fix-getversion-regex branch May 15, 2024 01:37
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

Successfully merging this pull request may close these issues.

2 participants