matlink / gplaycli

Google Play Downloader via Command line
Other
1.01k stars 178 forks source link

KeyError: 'docId' when trying to download an APK #231

Closed pnu-s closed 4 years ago

pnu-s commented 4 years ago

Hello there!

I'm trying to make gplaycli work since the recent issues with Google, and I have a new issue when trying to download an image with it: gplaycli -v -a -y -d com.facebook.katana -f /tmp/

[INFO] GPlayCli version 3.26 [Python3.6.8] 
[INFO] Configuration file is ['/home/toto/.config/gplaycli/gplaycli.conf']
[INFO] Device is bacon
[INFO] Using credentials to connect to API
[INFO] Using plaintext password
Traceback (most recent call last):
  File "/home/toto/.virtualenvs/gpc/bin/gplaycli", line 8, in <module>
    sys.exit(main())
  File "/home/toto/.virtualenvs/gpc/lib/python3.6/site-packages/gplaycli/gplaycli.py", line 724, in main
    cli.download(args.packages_to_download)
  File "/home/toto/.virtualenvs/gpc/lib/python3.6/site-packages/gplaycli/hooks.py", line 9, in check_connection
    return function(self, *args, **kwargs)
  File "/home/toto/.virtualenvs/gpc/lib/python3.6/site-packages/gplaycli/gplaycli.py", line 254, in download
    filename = detail['docId']+ ".apk"
KeyError: 'docId'

If I manually change the line filename = detail['docId']+ ".apk" with filename = "test.apk" it works as expected.

For the record, I used a manually-installed version of gpapi with the latest fix released by NoMore201 to get rid of the previous "login error" :https://github.com/NoMore201/googleplay-api

Thanks a lot in advance for your help!

Details:

pnu-s commented 4 years ago

Update: I dumped the detail map and found out that the handle of the application is present in docid instead of docId. Unsure whether this is something which changed recently but that solves the issue.

onny commented 4 years ago

Also have this bug, using plaintext login

Apfelwurm commented 4 years ago

I can confirm the bug and the fix with plaintext google login. Since i could not get the token dispenser working ( #229 ) i could not test if its senseful for all usecases to just change it and do a PR.

tiffgw commented 4 years ago

I can confirm the bug and the fix as well, need to use 'docid' instead of 'docId'.

kyak commented 4 years ago

Same problem.

mirabilos commented 4 years ago

This also happens with the gplaycli version in Debian unstable. Corresponding bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=950116

On some other äpps, I get “'Item not found.'” instead, though…

matlink commented 4 years ago

Fixed in 3.27.