Pytrends中不同类型的关键字

2024-05-23 16:38:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图用Pytrends在Google trends上阅读特定类型的特定趋势,但只能阅读“简单”关键字

例如: https://trends.google.com/trends/explore?geo=BR&q=%2Fg%2F11c0vm752r URL中的字符串:/g/11c0vm752r 如果在趋势中的搜索字段中键入相同的字符串,它将返回您尝试执行的搜索类型。在我的示例中,搜索Nissan Kicks(Type=Small SUV)而不一定是“Nissan Kicks”关键字

我正在努力:

pytrends = TrendReq(hl='en-US', tz=360)
keywords = ["/g/11c0vm752r"]
pytrends.build_payload(keywords, timeframe="today 5-y", geo="BR")
df = pytrends.interest_over_time()
print(df.head())

但它返回非常小的数据,就好像它实际上在搜索这个奇怪的字符串

有什么想法吗


Tags: 字符串br类型dfgoogle关键字趋势geo