(self, url: str)
| 88 | return post_id |
| 89 | |
| 90 | async def resolve_url(self, url: str) -> str: |
| 91 | sanitized_url = correct_url(url) |
| 92 | if not is_valid_url(url) or not await is_valid_medium_url(sanitized_url): |
| 93 | raise InvalidURL(f"Invalid Medium URL: {sanitized_url}") |
| 94 | |
| 95 | post_id = await resolve_medium_url(sanitized_url, self.timeout) |
| 96 | if not post_id: |
| 97 | raise InvalidMediumPostURL( |
| 98 | f"Could not find Medium post ID for URL: {sanitized_url}" |
| 99 | ) |
| 100 | |
| 101 | return post_id |
| 102 | |
| 103 | async def delete_from_cache(self, post_id: str): |
| 104 | self.cache.delete(post_id) |
no test coverage detected