telethon join channels working

This commit is contained in:
msramalho
2022-12-14 14:01:39 +00:00
parent 955891a411
commit b3860cfec1
17 changed files with 539 additions and 295 deletions

26
src/archivers/archiver.py Normal file
View File

@@ -0,0 +1,26 @@
from __future__ import annotations
from abc import abstractmethod
from dataclasses import dataclass
from metadata import Metadata
from steps.step import Step
@dataclass
class Archiverv2(Step):
name = "archiver"
def __init__(self, config: dict) -> None:
# without this STEP.__init__ is not called
super().__init__(config)
# self.setup()
# only for typing...
def init(name: str, config: dict) -> Archiverv2:
return Step.init(name, config, Archiverv2)
def setup(self) -> None:
# used when archivers need to login or do other one-time setup
pass
@abstractmethod
def download(self, item: Metadata) -> Metadata: pass