Giter Club home page Giter Club logo

Comments (14)

4knahs avatar 4knahs commented on July 17, 2024

Check googleplay.py somewhere around line 130 there is a split, replace it with this:

matchObj  = re.match("([^=]+)=(.*)",d)
k=matchObj.group(1)
v=matchObj.group(2)

Problem is that tokens can have the char '=' in them, so the split would return more than two values.

from googleplay-api.

jr3074 avatar jr3074 commented on July 17, 2024

so, i have to replace this
k, v = d.split("=")
with
matchObj = re.match("([^=]+)=(.*)",d) k=matchObj.group(1) v=matchObj.group(2)

?

from googleplay-api.

4knahs avatar 4knahs commented on July 17, 2024

Yes, except you need some new lines there...

Replace the line:

k, v = d.split("=")

With these 3 lines:

matchObj  = re.match("([^=]+)=(.*)",d)
k=matchObj.group(1)
v=matchObj.group(2)

If you are not familiar with python note that code should be aligned.

from googleplay-api.

jr3074 avatar jr3074 commented on July 17, 2024

it works thanks

from googleplay-api.

p3r1c0 avatar p3r1c0 commented on July 17, 2024

I have the same problem and I tryed with your suggest but I'm receiving the following error:
matchObj = re.match("([^=]+)=(.*)",d)
NameError: global name 're' is not defined

The code is the following:
for d in data:
if not "=" in d: continue
#raise LoginError("El valor de la variable antes de hacer el split es: " + d)
#k, v = d.split("=")
matchObj = re.match("([^=]+)=(.*)",d)
k=matchObj.group(1)
v=matchObj.group(2)
params[k.strip().lower()] = v.strip()
if "auth" in params:
#print("Auth-Token found: %s" % params["auth"])
self.setAuthSubToken(params["auth"])
elif "error" in params:
raise LoginError("server says: " + params["error"])
else:
raise LoginError("Auth token not found.")

Could you help me please? how I can fix it?

from googleplay-api.

4knahs avatar 4knahs commented on July 17, 2024

Hola Pedro! :)

The error is explicit, there is no 're'.

It is the python regex library so you just need to import it on the top of the file : import re

from googleplay-api.

p3r1c0 avatar p3r1c0 commented on July 17, 2024

Hola Mario,

Muchas gracias por tu rápida respuesta.

Veras, soy un estudiante de la Universidad de Baleares que esta haciendo un trabajo de fin de grado con la ayuda de esta herramienta.

El tema es que he implementado varios scripts usando las llamadas que proporciona este "crawler" y durante estos meses nunca había tenido ningún problema.

El problema es que como comenta el anterior usuario desde hace unos días recibo múltiples errores.

Es verdad que con lo que has comentados se ha solventado (disculpa mi anterior comentario) lo solvente rápidamente (me precipite preguntando).

El tema es que ahora, en la respuesta de la llamada, recibo mucha información (no necesaria) que antes no recibía. Por ejemplo, para la llamada de los permisos (véase el fichero .txt adjunto - (las primeras líneas no las tengas en cuenta son el resultado de intentar debuggear el código).

Como podrás ver recibo mucha información no necesaria y al final de la respuesta lo que si interesa (que era lo que devolvía antes).

¿Tienes alguna idea de que puede pasar? ¿O de como podría arreglarlo?

Muchas gracias por tu amabilidad.
prueba.txt

from googleplay-api.

4knahs avatar 4knahs commented on July 17, 2024

Hi Pedro,

The APIs from google play (server side) are constantly changing and so is their return. Since the project maintainer is not around anymore either look for forks or alternative projects.

I only use this project for downloading apps so i cant comment on the data it retrieves. For retrieval i use the following: https://github.com/facundoolano/google-play-scraper

Look at this example: http://www.marioalmeida.eu/2017/03/01/700/

from googleplay-api.

p3r1c0 avatar p3r1c0 commented on July 17, 2024

Hi Mario,

I'm sorry for my last spanish post, I thought that you was Spanish.

Many thanks for your help. But, I'm receiving (also) the following error :
'server says: BadAuthentication'
I'm confused about this, because usually the response is correct but sometimes I receive this error. Do you have this problem sometimes?

On the other hand, I could see your blog and I think that it's fantastic.

Would you mind if I ask you a few things about this? If you prefer I can to contact you for email.

Many thanks.

Regards,
Pedro

from googleplay-api.

4knahs avatar 4knahs commented on July 17, 2024

The bad authentication is a recurring problem atm with this tool (1-2 out 3).

Perhaps try reusing the token you get via authentication, I havent debugged this yet.

You can use the blog message system, stackoverflow (and send link somehow) or (worst case scenario :P ) email...

from googleplay-api.

jr3074 avatar jr3074 commented on July 17, 2024

ya is also got this issue, bad auth problem but sometimes..
maybe there is new login method from google service?

from googleplay-api.

Murthysagi avatar Murthysagi commented on July 17, 2024

I got same error

usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:845: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Traceback (most recent call last):
File "download.py", line 28, in
api.login(GOOGLE_LOGIN, GOOGLE_PASSWORD, AUTH_TOKEN)
File "/root/Desktop/googleplay-api/googleplay.py", line 138, in login
raise LoginError("server says: " + params["error"])
googleplay.LoginError: u'server says: BadAuthentication'

from googleplay-api.

jr3074 avatar jr3074 commented on July 17, 2024

badauthentication is the current issue,, i also have this issue

from googleplay-api.

proxyblue avatar proxyblue commented on July 17, 2024

@pedrogalindo @Murthysagi
BadAuthentication is solved #74

from googleplay-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.