NoMore201 / googleplay-api

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

No exception when 'RuntimeWarning: Unexpected end-group tag: Not all data was converted' #28

Open matlink opened 6 years ago

matlink commented 6 years ago

When token is expired or invalid, the login() method throws a warning in search('firefox', 1, None):

RuntimeWarning: Unexpected end-group tag: Not all data was converted
  message = googleplay_pb2.ResponseWrapper.FromString(response.content)

However, since it's not an exception, program is waiting on this instruction. I found something interesting, I don't know if you find another better way to achieve it:

https://github.com/matlink/googleplay-api/blob/0bc1382be545e7d99321cfd6b1207f9158d4c7ba/gpapi/googleplay.py#L201-L206