From 9159f0abd5dd64bdeceb0df6c57edd310c59c24e Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Thu, 2 Feb 2023 12:05:23 +0000 Subject: [PATCH] logs --- src/auto_archiver/archivers/telethon_archiver.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/auto_archiver/archivers/telethon_archiver.py b/src/auto_archiver/archivers/telethon_archiver.py index c05bc6f..6e6b225 100644 --- a/src/auto_archiver/archivers/telethon_archiver.py +++ b/src/auto_archiver/archivers/telethon_archiver.py @@ -101,6 +101,7 @@ class TelethonArchiver(Archiver): url = item.get_url() # detect URLs that we definitely cannot handle match = self.link_pattern.search(url) + logger.debug(f"TELETHON: {match=}") if not match: return False is_private = match.group(1) == "/c" @@ -109,6 +110,7 @@ class TelethonArchiver(Archiver): result = Metadata() + logger.debug(f"TELETHON STARTING") # NB: not using bot_token since then private channels cannot be archived: self.client.start(bot_token=self.bot_token) with self.client.start(): try: @@ -120,6 +122,7 @@ class TelethonArchiver(Archiver): logger.error(f"Could not fetch telegram {url}. This error may be fixed if you setup a bot_token in addition to api_id and api_hash (but then private channels will not be archived, we need to update this logic to handle both): {e}") return False + logger.debug(f"TELETHON GOT POST {post=}") if post is None: return False logger.info(f"fetched telegram {post.id=}")