我有低於設定的蟒蛇3.5代碼:如何使用python請求在google趨勢中下載csv文件?
from urllib.parse import unquote
import requests
company_code = '%2Fm%2F07gyp7'
company_code_unquoted = unquote(company_code)
search_params = {'gprop' : 'news' , 'q' : company_code_unquoted}
root_url = 'https://www.google.com/trends/explore'
request_link = requests.get(root_url , params = search_params)
company_spec_url = request_link.url
這將只是去谷歌麥當勞的趨勢網頁。我想下載這個xpath趨勢的csv文件:
CSV_file_xpath = "/html/body/div[2]/div[2]/md-content/div/div/div[1]/trends-widget/ng-include/widget/div/div/div[1]/widget-actions/div/button[3]/div"
有沒有辦法,不使用硒?
令牌動態生成,從而沒有的js –