前提・実現したいこと
google trend APIを使いたい
発生している問題・エラーメッセージ
File "---------------", line 27, in <module>
trending_searches_df = pytrend.trending_searches()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pytrends/request.py", line 321, in trending_searches
data=forms,
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pytrends/request.py", line 101, in _get_data
'response with code {0}.'.format(response.status_code), response=response)
pytrends.exceptions.ResponseError: The request failed: Google returned a response with code 404.
該当のソースコード
python
1 from pytrends.request import TrendReq 2 3# Login to Google. Only need to run this once, the rest of requests will use the same session. 4pytrend = TrendReq() 5 6trending_searches_df = pytrend.trending_searches()
試したこと
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー