NoMore201 / googleplay-api

Google Play Unofficial Python API
Other
409 stars 208 forks source link

Cannot download free app that is not purchased #171

Open w0r7h opened 1 year ago

w0r7h commented 1 year ago

Hello, trying to use the "download" function with the following app:

com.facebook.orca

I receive the following error:

  File "/scripts/get_apk.py", line 29, in download_apk
    download = server.download(packageName=package_name, versionCode=int(package_version), expansion_files=True)
  File "/home/developer/workspace/gpapi/googleplay.py", line 703, in download
    return self.delivery(packageName, versionCode, offerType, dlToken,
  File "/home/developer/workspace/gpapi/googleplay.py", line 628, in delivery
    raise RequestError('App not purchased')
gpapi.googleplay.RequestError: 'App not purchased'

How can I purchase the app automatically? Is there a function to do it?

ghost commented 1 year ago

download already calls purchase:

https://github.com/NoMore201/googleplay-api/blob/664c399f8196e1eb7d2fcda4af34e5dc1fca0f20/gpapi/googleplay.py#L617-L620

so code might have an error. if it helps, I have another tool here:

https://github.com/1268/google

mar0n0 commented 1 year ago

Yes, the code might have an error like you said.