Python 横幅图像无法';不要刮

Python 横幅图像无法';不要刮,python,web-scraping,scrapy,Python,Web Scraping,Scrapy,我正试图从以下链接中删除横幅图像(较大图像)的链接:https://allevents.in/pune/filmmaking-workshop/20001033616713。为此,我尝试使用这两个命令,这两个命令都返回一个空列表 response.xpath('//img[@class="event-banner-image"]/@src').extract() response.xpath('//*[@class="event-banner-image"]/@src').extract()

我正试图从以下链接中删除横幅图像(较大图像)的链接:
https://allevents.in/pune/filmmaking-workshop/20001033616713
。为此,我尝试使用这两个命令,这两个命令都返回一个空列表

response.xpath('//img[@class="event-banner-image"]/@src').extract()

response.xpath('//*[@class="event-banner-image"]/@src').extract()

我将Scrapy与Python结合使用。

实际上,您在页面源代码中查找的图像有多个源代码

只需单击ctrl+u(在某些浏览器上可能有所不同)以“查看页面源”并搜索url字符串

我发现你可以在meta标签下面看到图像:

$ scrapy shell https://allevents.in/pune/filmmaking-workshop/20001033616713
In : response.xpath('//meta[@property="og:image"]/@content').extract()
Out: ['https://cdn-az.allevents.in/banners/2d76d5624f4e4b83155a51d60b3872fb-rimg-w525-h350-gmir.jpg']

你能指出你想要提取的图像吗?@Granitosaurus:这张: