Comments (1)
+1,
这个我在源码中看到了有个“geo”的参数,是指定国别的,可否直接开放为可选参数,允许指定;
原代码:
def google_index(keyword="python", start_date="2019-12-01", end_date="2019-12-04"):
"""
返回指定区间的谷歌指数
:param keyword:
:param start_date: 2019-12-10T10
:param end_date: 2019-12-10T23
:return:
"""
try:
pytrends = TrendReq(hl="en-US", tz=360)
kw_list = [keyword]
pytrends.build_payload(
kw_list, cat=0, timeframe=start_date + " " + end_date, geo="", gprop=""
)
search_df = pytrends.interest_over_time()
search_df['value'] = search_df[keyword]
search_df['date'] = search_df.index
res_df = search_df.drop(['isPartial', keyword], axis=1)
return res_df
except:
return None
from gopup.
Related Issues (20)
- covid_163获取世界历史时点数据出错,显示WinError 10054
- 头条指数获取失败,显示None HOT 1
- token是放哪里用的?
- 大佬链接失效了
- 新闻联播2021年9月后没有数据了
- 百度指数返回值为None HOT 1
- pip 安装报错 HOT 8
- 宏观数据因为有中文导致 print 表格不对齐
- shibor 数据获取不到
- 新闻联播新闻稿数据提示没有这个接口 HOT 1
- 希望完善热搜榜,增加包括但不限于抖音、头条、贴吧等的热搜。 HOT 1
- 大佬,百度指数似乎更改了加密方式,现在爬到的数据和网页显示的数据是不同的
- bug: 百度指数获取数据不对 HOT 1
- 巨量指数接口已经失效
- gp.get_gdp_quarter()报错
- 百度指数返回None
- 3.12.0python能下载gopup吗
- 官网怎么打不开了
- 是否还在维护?
- 奉劝大家不要使用该库,全是使用他们自家的api实现的,而且他们自家的都无法访问了
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gopup.