MCPcopy
hub / github.com/scrapy/scrapy / _spider_domains

Function _spider_domains

scrapy/utils/url.py:30–33  ·  view source on GitHub ↗
(spider: type[Spider])

Source from the content-addressed store, hash-verified

28
29
30def _spider_domains(spider: type[Spider]) -> Iterable[str]:
31 yield spider.name
32 if allowed_domains := getattr(spider, "allowed_domains", None):
33 yield from allowed_domains
34
35
36def url_is_from_spider(url: UrlT, spider: type[Spider]) -> bool:

Callers 1

url_is_from_spiderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected