def __init__(self, user_url: str, proxy=None): self._tasks = None self.url = user_url assert user_url.startswith(BASE_URL) self.user_id = user_url.replace(BASE_URL, '') self._proxies = get_proxy(proxy) self._fetcher = DummyFetcher(**self._proxies)
def __init__(self, user_url: str, proxy=None): self._tasks = None self.url = user_url assert user_url.startswith(BASE_URL) self.user_id = user_url.replace(BASE_URL, '') self._proxies = get_proxy(proxy) self._fetcher = DummyFetcher(**self._proxies) self._task_maker = TaskMaker( user_id=self.user_id, meta_fetcher=BrowserMetaFetcher(), )
def __init__(self, url, username, password, proxy=None): proxies = get_proxy(proxy) requests_kwargs = { "timeout": (3, 10), } requests_kwargs.update(proxies) self.api = AppPixivAPI(**requests_kwargs) self._fetcher = PixivFetcher(**proxies) self.api.login(username, password) self._user_id = int(url.split("/")[-1]) self._dir_name = None self._total_illustrations = 0 self._fetch_user_detail()