Separate setup() and module_setup().

This commit is contained in:
erinhmclark
2025-02-10 17:25:15 +00:00
parent c4bb667cec
commit 2c3d1f591f
14 changed files with 17 additions and 26 deletions

View File

@@ -18,14 +18,13 @@ class TelethonExtractor(Extractor):
invite_pattern = re.compile(r"t.me(\/joinchat){0,1}\/\+?(.+)")
def setup(self, config: dict) -> None:
def module_setup(self) -> None:
"""
1. makes a copy of session_file that is removed in cleanup
2. trigger login process for telegram or proceed if already saved in a session file
3. joins channel_invites where needed
"""
super().setup(config)
logger.info(f"SETUP {self.name} checking login...")
# make a copy of the session that is used exclusively with this archiver instance