使用python爬取豆瓣电影信息

import requests 
import json   
import openpyxl  # 这是 python 里面 excel 库

#  编辑 headers 头 模拟浏览器访问
header = {
   
'Cookie': '__utmc=30149280; viewed="1588297"; gr_user_id=b78c725d-9785-4501-869e-d81706d759c1; douban-fav-remind=1; bid=QcEG5u6kXNc; ll="118254"; __utmz=30149280.1641457492.5.2.utmcsr=baidu|utmccn=(organic)|utmcmd=organic; push_noty_num=0; push_doumail_num=0; __utmv=30149280.21060; __utmz=223695111.1641457653.1.1.utmcsr=baidu|utmccn=(organic)|utmcmd=organic; __utmc=223695111; _vwo_uuid_v2=DED9813B5C868AF87399D08E660830D51|f0388c24bfc98cf69c2ccbcf3f6d9510; dbcl2="210607636:2U5cskKfaMI"; ck=kmh5; __gads=ID=5737969719d6c9a9-22657ce2abcf0046:T=1641457886:RT=1641457886:S=ALNI_MYyP58NpbJCsJ1CxfP22vD5U4HkZg; ap_v=0,6.0; __utma=30149280.186724933.1607345371.1641457492.1641481393.6; __utmb=30149280.0.10.1641481393; __utma=223695111.1472084854.1641457653.1

你可能感兴趣的:(爬虫,python,开发语言,后端,爬虫)