Closed jgcbrouns closed 5 years ago
I installed via PIP. After researching the install directory I found that the method still has the old implementation
def trending_searches(self):
"""Request data from Google's Trending Searches section and return a dataframe"""
# make the request
forms = {'ajax': 1, 'pn': 'p1', 'htd': '', 'htv': 'l'}
req_json = self._get_data(
url=TrendReq.TRENDING_SEARCHES_URL,
method=TrendReq.POST_METHOD,
data=forms,
)['trendsByDateList']
result_df = pd.DataFrame()
# parse the returned json
sub_df = pd.DataFrame()
for trenddate in req_json:
sub_df['date'] = trenddate['date']
for trend in trenddate['trendsList']:
sub_df = sub_df.append(trend, ignore_index=True)
result_df = pd.concat([result_df, sub_df])
return result_df
👍 I have the same problem
So what is the status of this? I still got same error, when tried changing to different country.
Dear all,
Upon invoking the trending_searches() method like so:
pytrends.trending_searches(pn='p4') # in Japanese
I obtain the following error:
It seems like the last update did not follow through? Can anyone help me with this problem?