Skip to content
masterclass Buddy

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.

Subscribe
  • CrawlSpider
  • Rule
  • Link
  • scrapy.linkextractors.LinkExtractor
  • scrapy.linkextractors.lxmlhtml.LxmlLinkExtractor
  • extract_links

Source: Link Extractors — Scrapy 2.19.0 documentation. Checked 2026-11-03.