tanishqmanuja / apkmirror-downloader

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

Failing to download Reddit #8

Closed Sp3EdeR closed 3 months ago

Sp3EdeR commented 5 months ago

Hello,

Great app, big thanks for making and maintaining it!

I am trying to download Reddit with the tool, using this config:

{"options": {"arch": "universal"}, "apps": [{"name": "Reddit 2024.22.0", "org": "redditinc", "repo": "reddit", "version": "2024.22.0"}]}

It fails to do the download. Can you check this out please?

Sp3EdeR commented 5 months ago

Getting similar download errors on some other apps too:

manuelschneider commented 5 months ago

I've debugged the same issue for ovpn. In utils.ts there's a check for contentType == "application/vnd.android.package-archive" . However, the content type I get for the download link is application/octet-stream.

I assume there's a reason why this check is there and we should not simply remove it?

Maybe an alternative option would be to check the mimetype of the downloaded file after dowload?

Sp3EdeR commented 5 months ago

MIME is not encoded within files usually. The server probably tries to figure it out. octet stream can be used as a fallback, it basically just means that it is a binary file.

I think it is okay to accept, because it clearly is not an HTML page or something similar.

tanishqmanuja commented 5 months ago

Thanks for reporting the issue, I am out of capacity to maintain and improve this project for some time. But, I do plan on doing a complete rewrite using BunJS as it works just fine now on windows too. This project just came out of my own need at the time for downloading apks for yt revanced, so it was not tested on other apps with different version schema and mime types.

I the meantime you can fork and improve this for your own use and also PR's are more than welcome here ✌🏻. Also if you have any feature suggestions feel free to drop them as issues here, which will help during future development.

Sp3EdeR commented 5 months ago

Thanks for reporting the issue, I am out of capacity to maintain and improve this project for some time. But, I do plan on doing a complete rewrite using BunJS as it works just fine now on windows too. This project just came out of my own need at the time for downloading apks for yt revanced, so it was not tested on other apps with different version schema and mime types.

I the meantime you can fork and improve this for your own use and also PR's are more than welcome here ✌🏻. Also if you have any feature suggestions feel free to drop them as issues here, which will help during future development.

ReVanced usage here too. Specifically a fully integrated pipeline solution: https://github.com/Sp3EdeR/revanced-auto-patcher. But Node.js is one system I've not yet tinkered with, and I don't want to start just for this. :) And I'm also out of capacity to port this to python right now.

tanishqmanuja commented 3 months ago

Please reopen if further assistance is required.