爬取豆瓣TOP250榜第一页的电影信息(xpath极简版) from lxml import etree import requests\nurl='https://movie.douban.com/top250' headers={ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36' } res=requests.get(url,headers=headers).text s=etree.HT