admin管理员组文章数量:1125941
I'm using the pytrends library to fetch real-time trending searches from Google Trends, specifically for Mexico (pn='MX'). The same code used to work previously, but now it always returns an empty object. I couldn't find any recent updates to the library or its documentation that address this issue.
I checked the official pytrends PyPI page, and it seems the library hasn't been updated since April 2023. Has Google changed the endpoint or structure for fetching real-time trends, making this functionality in pytrends outdated? Should I consider alternative libraries or APIs for accessing Google Trends data, and if so, which ones are recommended?
Here is the code I'm using:
from pytrends.request import TrendReq
# Initialize pytrends
pytrend = TrendReq(hl='es-MX')
# Fetch real-time trending searches for Mexico
trends = pytrend.realtime_trending_searches(pn='MX')
print(trends)
The output I get is:
Empty
本文标签: pythonWhy does pytrends39 realtimetrendingsearches return an empty objectStack Overflow
版权声明:本文标题:python - Why does pytrends' realtime_trending_searches return an empty object? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736676578a1947212.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论