Skip to content

Fix getVersion discrepancy regex discrepancy - #145

Closed
HotaruBlaze wants to merge 1 commit into
MCMi460:developmentfrom
HotaruBlaze:fix-getversion-regex
Closed

HotaruBlaze wants to merge 1 commit into
MCMi460:developmentfrom
HotaruBlaze:fix-getversion-regex

Conversation

@HotaruBlaze

Copy link
Copy Markdown
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

spotlightishere commented May 8, 2024 •

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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

HotaruBlaze commented May 10, 2024 •

Copy link
Copy Markdown
Contributor Author

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