python - Scrapy LinkExtractor cannot extract links with href of mailto: -
i'm using linkextractor class extract links page
for link in linkextractor(allow=()).extract_links(response): print link.url this prints urls page. can't seem links have href equal mailto: link. example:
<a href="mailto:example@gmail.com">mail</a> do need pass argument linkextractor make grab links mailto: ?
you don't need use linkextractor urls need, use xpath response object.
all_links = response.xpath('//a/@href').extract() linkextractor focuses on getting links follow, that's why avoids mailto links default.
Comments
Post a Comment