GeneralMills / pytrends

Pseudo API for Google Trends
Other
3.25k stars 815 forks source link

No JSON object could be decoded #113

Closed ns3115neha closed 7 years ago

ns3115neha commented 7 years ago

I cant get to work these commands

Get Google Hot Trends data

trending_searches_df = pytrend.trending_searches()

Get Google Top Charts

top_charts_df = pytrend.top_charts(cid='actors', date=201611)

it gives me the same error,Howerver i can execute every other without error

ernestk89 commented 7 years ago

Same here. Does anyone have an idea on how to overcome this?

dreyco676 commented 7 years ago

You are welcome to take a look, I probably won't get a lot of free time to look at this until mid/late April.

print(req.text) before the json.loads() in the source code will show you what the server is returning before parsing. Pair this with manual inspection of Google Trends using Fiddler 4 to see if something else should be changed.

shawnhill commented 7 years ago

@dreyco676 I forgot to associate the commit with this issue, but this PR fixes this bug. https://github.com/GeneralMills/pytrends/pull/118

rmertens commented 7 years ago

@dreyco676 @petersonnek any chance either of you could merge #118 ? it's a 2 line PR that un-breaks the library :)

petersonnek commented 7 years ago

Sorry for the delay. @dreyco676 normally takes care of this repo and he's out of the office. I've tested your change and merged your pull request.