sheetsync: And all the other places with that mistake

pull/471/head
Mike Lang 2 weeks ago
parent e14afdb6c1
commit 3d03f0d984

@ -330,16 +330,16 @@ class EventsSync(SheetSync):
def download_media(self, url): def download_media(self, url):
hostname = urlparse(url).hostname hostname = urlparse(url).hostname
if hostname in ("youtu.be", "youtube.com"): if hostname in ("youtu.be", "youtube.com"):
self.logger.info(f"Ignoring url {url:!r}: Blocklisted hostname") self.logger.info(f"Ignoring url {url!r}: Blocklisted hostname")
if check_for_media(self.media_dir, url): if check_for_media(self.media_dir, url):
self.logger.info(f"Already have content for url {url:!r}") self.logger.info(f"Already have content for url {url!r}")
return return
try: try:
download_media(url, self.media_dir) download_media(url, self.media_dir)
except Exception: except Exception:
self.logger.warning(f"Failed to download url {url:!r}", exc_info=True) self.logger.warning(f"Failed to download url {url!r}", exc_info=True)
raise raise
self.logger.info(f"Downloaded media for url {url:!r}") self.logger.info(f"Downloaded media for url {url!r}")
class ArchiveSync(EventsSync): class ArchiveSync(EventsSync):

Loading…
Cancel
Save