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

Return value of apk.get_download_url is an empty string #5

Open
noahbald opened this issue Aug 16, 2020 · 5 comments
Open

Return value of apk.get_download_url is an empty string #5

noahbald opened this issue Aug 16, 2020 · 5 comments

Comments

@noahbald
Copy link

Hello, I want to use this package to crawl through various apps and download them for a research project.
Right now I'm trying to set it up just to download chrome, however, when I run the code (shown below) the return value of apk.get_download_url is an empty string, causing apk.fetch to fail

from apkfetch import APKfetch

def main():
  apk = APKfetch()
  apk.login('example@email.com', 'password', 'abcd1234efgh5678')
  package = 'com.android.chrome'
  version = apk.version(package)
  url = apk.get_download_url(package, version)
  apk.fetch(package, version)

if __name__ == '__main__':
    main()

Is there something wrong with the way I've set this up, or is it a bug which needs to be resolved.

FYI the value of response.text after line 172 in apkfetch.py is '\n\x05�\x01\x02\x08\x03*\x02\x08dJ\x1c\x08\x12�\x01\x17\n\x13\x08ε㨀Ϊ�λ\x02\x15F�h\n\x1d\x03Ξ\tΛ\x10\x01' and the status code is 200

@iDuronto
Copy link

Has anyone found a workaround to this?

@yotamgod
Copy link

yotamgod commented Nov 8, 2020

I would also appreciate a fix

@yotamgod
Copy link

yotamgod commented Nov 8, 2020

Well I figured out the reason for the blank url - it seems the app you are downloading needs to be "purchased".
I found a similar case in gpapi and just assumed it is for the same reason.

@noahbald
Copy link
Author

Did you get it to work @yotamgod? I was testing with downloading Chrome at the time, which is free, and I was still getting this issue.

@yotamgod
Copy link

I did.
Try making an additional request to the "purchase" endpoint of the google api before the delivery request (replace "/delivery").
Play around with it and check out some other similar projects for inspiration.
Good luck!

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