爬取百度指数代码如果cookies失效的麻烦替换下爬取关键词和访问量并保存csv Environment Python3.7import datetime import requests import sys import time import json import pandas as pd word url http index.baidu.com api SearchApi thumbnail area0word def get html url headers User Agent Mozilla5.0Windows NT10.0Win64x64AppleWebKit537.36KHTML like Gecko Chrome89.0.4389.82Safari537.36Host index.baidu.com Referer http index.baidu.com v2main i