tanishqmanuja / apkmirror-downloader

📥 Download apps from APKMirror with ease.
https://www.npmjs.com/package/apkmirror-downloader
MIT License
35 stars 8 forks source link

getting only alpha versions from apkmirror versions #5

Closed mamiiblt closed 10 months ago

mamiiblt commented 10 months ago

Hello, i have an automation project. Each version obtained from apkmd (akpmd decides that the versions are the latest version according to the upload date on apkmirror) may not actually be the most up-to-date build. How can I check in my own code that this is the latest version?

The app i want to get the latest version of is instagram (latest version is 315.0.0.0.20 alpha) Is it possible to make a setting accordingly while downloading the application in apkmd?

image

tanishqmanuja commented 10 months ago

Yeah, it should be possible.. here is the line you would be interested in

https://github.com/tanishqmanuja/apkmirror-downloader/blob/main/src%2Fscrapping.ts#L49

Current apkmd gets the first item in the table.

What you could do is scan the entire table parsing the version from each item and let the highest parser version be the latest version.

Although I don't know what kind of automation you're doing. But keep in mind APK Mirror has a Cloudflare IP ban system if you send requests to APK Mirror too quickly or frequently.

mamiiblt commented 10 months ago

the automation of part I use works on workflows, so it does not pose a problem as there will be no IP ban, thank you.