from lxml import etree
import requests
hed={
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36"
}
resp=requests.get("https://movie.douban.com/",headers=hed)
# print(resp.text)
et=etree.HTML(resp.text)
result=et.xpath("//div/a/@href")
result=et.xpath("//div/a/text()")
print(result)