googleplay-api icon indicating copy to clipboard operation
googleplay-api copied to clipboard

List from subcategory "too many results requested"

Open noahbald opened this issue 5 years ago • 2 comments

I've found that when nb_results + offset > 512 in api.list() then there will be a RequestError in executeRequestApi2 stating that "too many results requested"

I haven't found any way to get past this so far.

The following code will throw the error

def download_category(category: str, n: int=1000):
  LIMIT_DL = 100
  sub_categories = api.list(category)
  for sub_category in sub_categories:
    for i in range(n//LIMIT_DL):
      apks = api.list(category, ctr=sub_category, nb_results=min(LIMIT_DL, n - i*LIMIT_DL), offset=i*LIMIT_DL)
      # TODO: download the apks

noahbald avatar Sep 30 '20 05:09 noahbald

As far as I have checked, max limit for nb_results is 100

cstayyab avatar Oct 06 '20 11:10 cstayyab

This is true, what I mean is that if nb_results + offset > 512 (or 513?) there is an error. So, for example, if nb_results == 50 and offset == 500 then the error will be thrown

noahbald avatar Oct 11 '20 04:10 noahbald