NoMore201 / googleplay-api

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

Fixes app listing offset #111

Open rscmendes opened 4 years ago

rscmendes commented 4 years ago

This PR is based in PR #62, which in turn is based on this comment.

This PR fixes the offset field when listing the apps. It also adds a test to check that the offset is working properly.

smfahadhassan commented 3 years ago

This code works as long as the offset is below 3500, but for greater (or equal) values it throws an "String index out of range" Error ..

Traceback (most recent call last): File "test.py", line 129, in appList = server.list(cat, catList[0], 100, 3500) File "/mnt/c/Users/virde/Desktop/gpapi/venv/lib/python3.8/site-packages/gpapi/googleplay.py", line 469, in list path += "&ctntkn=" + self.get_token(int(offset)) File "/mnt/c/Users/virde/Desktop/gpapi/venv/lib/python3.8/site-packages/gpapi/googleplay.py", line 444, in get_token token = "C" + key + requests.utils.quote(code_suffix[s]) IndexError: string index out of range

Any help will be appreciated..