Scrapy · Class
LinkExtractor
LxmlLinkExtractor finds links in Scrapy responses and returns Link objects. Configure it to keep or reject links by URL, domain, page region, HTML element, text, and other rules.
Last updated
- Since
- 2.17.0 for deny_tags and deny_attrs
Syntax
LxmlLinkExtractor(allow=(), deny=(), allow_domains=(), deny_domains=(), restrict_xpaths=(), tags=('a', 'area'), attrs=('href',), canonicalize=False, unique=True, process_value=None, deny_extensions=None, restrict_css=(), strip=True, restrict_text=None, deny_tags=(), deny_attrs=())In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
CrawlSpiderRuleLinkscrapy.linkextractors.LinkExtractorscrapy.linkextractors.lxmlhtml.LxmlLinkExtractorextract_links