def __init__( self, option: dict[str, Any] = {}, pool: Pool = None, max_threads: int = -1, ) -> None: create_user.__init__(self, option) if not self.username: self.username = f"u{self.id}" self.lists = {} self.links = content_types() self.subscriptions: list[create_user] = [] self.chats = None self.archived_stories = {} self.mass_messages = [] self.paid_content = [] temp_pool = pool if pool else api_helper.multiprocessing() self.pool = temp_pool self.session_manager = api_helper.session_manager( self, max_threads=max_threads, use_cookies=False) self.auth_details: auth_details = auth_details() self.profile_directory = option.get("profile_directory", "") self.guest = False self.active: bool = False self.errors: list[error_details] = [] self.extras: dict[str, Any] = {}
def __init__( self, option: dict[str, Any] = {}, user: create_user = create_user(), pool: Optional[Pool] = None, max_threads: int = -1, ) -> None: self.id = user.id self.username = user.username if not self.username: self.username = f"u{self.id}" self.name = user.name self.email = user.email self.isPerformer = user.isPerformer self.chatMessagesCount = user.chatMessagesCount self.subscribesCount = user.subscribesCount self.lists = {} self.links = content_types() self.subscriptions: list[create_user] = [] self.chats = None self.archived_stories = {} self.mass_messages = [] self.paid_content = [] self.pool = pool self.session_manager = api_helper.session_manager(self, max_threads=max_threads) self.auth_details: Optional[auth_details] = None self.cookies: Dict[str, Any] = {} self.profile_directory = option.get("profile_directory", "") self.guest = False self.active: bool = False self.errors: list[error_details] = [] self.extras: Dict[str, Any] = {}