Determine the origin URL for a sitemap source.
(source: SitemapSource)
| 217 | |
| 218 | |
| 219 | def _get_origin_url(source: SitemapSource) -> str: |
| 220 | """Determine the origin URL for a sitemap source.""" |
| 221 | if source['type'] == 'url' and 'url' in source: |
| 222 | return source['url'] |
| 223 | if source['type'] == 'raw' and 'content' in source: |
| 224 | # For raw content sources, create a consistent identifier |
| 225 | return f'raw://{sha256(source["content"].encode()).hexdigest()}' |
| 226 | return '' |
| 227 | |
| 228 | |
| 229 | async def _process_sitemap_item( |
no outgoing calls
no test coverage detected