Parse the sitemaps from the robots.txt file and return a `Sitemap` instance. Args: enqueue_strategy: Forwarded to `get_sitemaps`; see that method for details.
(self, *, enqueue_strategy: EnqueueStrategy)
| 126 | return int(crawl_delay) if crawl_delay is not None else None |
| 127 | |
| 128 | async def parse_sitemaps(self, *, enqueue_strategy: EnqueueStrategy) -> Sitemap: |
| 129 | """Parse the sitemaps from the robots.txt file and return a `Sitemap` instance. |
| 130 | |
| 131 | Args: |
| 132 | enqueue_strategy: Forwarded to `get_sitemaps`; see that method for details. |
| 133 | """ |
| 134 | sitemaps = self.get_sitemaps(enqueue_strategy=enqueue_strategy) |
| 135 | if not self._http_client: |
| 136 | raise ValueError('HTTP client is required to parse sitemaps.') |
| 137 | |
| 138 | return await Sitemap.load( |
| 139 | sitemaps, self._http_client, self._proxy_info, parse_sitemap_options={'enqueue_strategy': enqueue_strategy} |
| 140 | ) |
| 141 | |
| 142 | async def parse_urls_from_sitemaps(self, *, enqueue_strategy: EnqueueStrategy) -> list[str]: |
| 143 | """Parse the sitemaps in the robots.txt file and return a list URLs. |
no test coverage detected