egirault / googleplay-api

Google Play Unofficial Python API - This project was a PoC and is not maintained anymore. Please feel free to fork it and improve it in any way.
879 stars 373 forks source link

preFetch not hitting on logically equiv urls #20

Open duanes opened 11 years ago

duanes commented 11 years ago

The preFetch urls returned by ResponseWrapper have the ctr= param before the cat param, eg

list?c=3&ctr=apps_topselling_paid&cat=BOOKS_AND_REFERENCE

The urls now built by GooglePlayAPI.list() now append those params in the opposite order. As a result, these urls never hit in the preFetch cache and the data returned in the original request is wasted.

A complicated fix would be to check urls for equality in a way which understands that the order of params is often irrelevant. A simpler fix is to change list() to append these specific params in the same order that Google's servers apparently prefer.