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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -