1. 筛选属性包含某字符串的标签(如id = 'bigbaong' 查询包含'big'字符的就可以筛选到)
res = response.xpath("//a[contains(@id,'big')]") #打印结果 print(res.extract_first())
1. 筛选属性包含某字符串的标签(如id = 'bigbaong' 查询包含'big'字符的就可以筛选到)
res = response.xpath("//a[contains(@id,'big')]") #打印结果 print(res.extract_first())