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

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -