longxiaofei / spider-BaiduIndex

data sdk for baidu Index
MIT License
748 stars 229 forks source link

【教程】如何查询不同城市的百度指数 #72

Open longxiaofei opened 2 years ago

longxiaofei commented 2 years ago
# 查询城市对应编码
from qdata.baidu_index.config import PROVINCE_CODE, CITY_CODE

print(PROVINCE_CODE)
print(CITY_CODE)

# 查询北京的指数
for index in get_search_index(
    keywords_list=keywords_list,
    start_date='2018-01-01',
    end_date='2019-05-01',
    cookies=cookies,
    area=911
):
    print(index)
xyy-711 commented 2 years ago

感谢感谢!

hulala220 commented 1 year ago

您好,怎么在以前的format中也加上区域(省区)一列呢?