在使用xpath对猫眼电影网站爬虫练习时,定位标签只能定位到第一个标签,定位第二个标签的时候就输出了一个空列表
import requests
from lxml import html
url = 'https://www.maoyan.com/films?showType=2'
response = requests.get(url)
etree = html.etree
r = etree.HTML(response)
q = r.xpath('/html/body/div[4]/div/div[2]/div[2]/dl/dd')