MCPcopy
hub / github.com/scrapy/scrapy / extract_links

Method extract_links

scrapy/linkextractors/lxmlhtml.py:141–145  ·  view source on GitHub ↗
(self, response: TextResponse)

Source from the content-addressed store, hash-verified

139 return self._deduplicate_if_needed(links)
140
141 def extract_links(self, response: TextResponse) -> list[Link]:
142 base_url = get_base_url(response)
143 return self._extract_links(
144 response.selector, response.url, response.encoding, base_url
145 )
146
147 def _process_links(self, links: list[Link]) -> list[Link]:
148 """Normalize and filter extracted links

Callers

nothing calls this directly

Calls 2

_extract_linksMethod · 0.95
get_base_urlFunction · 0.90

Tested by

no test coverage detected