Comments (8)
I am having the same issue since today, I suspect that google changed the login page in some way.
Update:
After looking at the source code of the login page I noticed that something minor changed.
Fortunately this is an easy fix (for now at least):
Fix it by changing line 64
in pyGTrends.py from
galx = re.compile('<input name="GALX"[\s]+type="hidden"[\s]+value="(?P<galx>[a-zA-Z0-9_-]+)">')
To:
galx = re.compile('<input type="hidden"[\s]+name="GALX"[\s]+value="(?P<galx>[a-zA-Z0-9_-]+)">')
In case the type
and name
arguments are going to be switching around frequently something like this might be a better solution:
Change line 64
- line 67
in pyGTrends.py from
galx = re.compile('<input name="GALX"[\s]+type="hidden"[\s]+value="(?P<galx>[a-zA-Z0-9_-]+)">')
m = galx.search(resp)
if not m:
raise Exception('Cannot parse GALX out of login page')
To:
galx = re.compile('<input name="GALX"[\s]+type="hidden"[\s]+value="(?P<galx>[a-zA-Z0-9_-]+)">')
m = galx.search(resp)
if not m:
galx = re.compile('<input type="hidden"[\s]+name="GALX"[\s]+value="(?P<galx>[a-zA-Z0-9_-]+)">')
m = galx.search(resp)
if not m:
raise Exception('Cannot parse GALX out of login page')
from pytrends.
I am still getting the issue...did you test this?
from pytrends.
You think I would suggest a fix without testing it? 😜
I copy pasted the code that worked for me into my comment. (Maybe something went wrong there?)
It could be that they changed something in a dynamic way, that would explain why my fix works for me but not for you.
If you follow these steps you might be able to figure out the problem:
- Go to: https://accounts.google.com/ServiceLoginBoxAuth
- View source and search for
GALX
- The regular expression of
line 64
should capture the GALX value after thevalue
argument
In my case the problem was that the order of the arguments changed to type
before name
from pytrends.
haha you can see the frustration boiling over;) Sorry about that...let me check it out. Thanks!
from pytrends.
Works perfectly!
from pytrends.
Is there a fix that should get pull request?
On Wed, Dec 9, 2015 at 12:41 PM, patrick-ogrady [email protected]
wrote:
Works perfectly!
—
Reply to this email directly or view it on GitHub
#25 (comment).
from pytrends.
We both encountered an issue with login and the above fix remedied it very
nicely! I recommend following the advice above of replacing line 64 with
64-67!
On Wednesday, December 9, 2015, John Hogue [email protected] wrote:
Is there a fix that should get pull request?
On Wed, Dec 9, 2015 at 12:41 PM, patrick-ogrady <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');>
wrote:Works perfectly!
—
Reply to this email directly or view it on GitHub
<#25 (comment)
.—
Reply to this email directly or view it on GitHub
#25 (comment).
from pytrends.
I can send you a pull request tomorrow morning if you want.
Update:
See #26 for the pull request with my fix.
from pytrends.
Related Issues (20)
- It broke again HOT 57
- Code documentation :)
- Broken for short timeframe - question for experts HOT 4
- related_queries and related_topics not working (infinite loop) HOT 4
- Anyone getting "Holes" in the data again? HOT 2
- Many tests fail
- Error with all request: HTTPSConnectionPool(host='trends.google.com', port=443): Max retries exceeded HOT 17
- Update to Selenium script HOT 4
- is that pytrends still unavailiable everyone? HOT 4
- Selenium script giving exception HOT 2
- Error 429 for the past few days HOT 14
- Interested in Maintainers
- KeyError: 'content-type' when calling build_payload()
- Is there an upper limit on display results? HOT 1
- 429 Error HOT 7
- I am interested in reverse engineering Google trends HOT 1
- daily serach trends
- Too many 429 error responses. Max retries exceeded. #578 HOT 3
- Search volume HOT 1
- Does related queries work? I keep getting 429 HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytrends.