def __init__(self, slack_incoming_hook_url, pixiv_username, pixiv_password, polling_seconds): self._slack_incoming_hook_url = slack_incoming_hook_url self._pixiv_api = pixivpy3.PixivAPI() self._pixiv_api.login(pixiv_username, pixiv_password) self._polling_seconds = polling_seconds self._last_fetched_post_id = 0
def __init__(self): self.DOWNLOAD_REEOR = {'user': [], 'works': []} utils.loadConfig() self.setLog() params = self.setProxy() self.pixiv = pixivpy3.PixivAPI(**params) self.pixiv.set_accept_language("zh-cn") self.login()
def __init__(self): self.ua = requests.Session() self.ua.mount("http://", requests.adapters.HTTPAdapter(max_retries=3)) self.ua.mount("https://", requests.adapters.HTTPAdapter(max_retries=3)) self.api = pixivpy3.PixivAPI() self.api.client_id = "MOBrBDS8blbauoSck0ZfDbtuzpyT" self.api.client_secret = "lsACyCD94FhDUtGTXi3QzcFE2uU1hqtDaKeqrdwj" self.api.requests = self.ua
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.aapi = pixivpy3.AppPixivAPI() self.papi = pixivpy3.PixivAPI() saved_auth = self.get_param_cache() if saved_auth: self.log.info("Using cached auth") self.aapi.set_auth(access_token=saved_auth['a_access_token'], refresh_token=saved_auth['a_refresh_token']) self.papi.set_auth(access_token=saved_auth['p_access_token'], refresh_token=saved_auth['p_refresh_token'])
def __init__(self): self.ua = requests.Session() self.ua.mount("http://", requests.adapters.HTTPAdapter(max_retries=3)) self.ua.mount("https://", requests.adapters.HTTPAdapter(max_retries=3)) self.api = pixivpy3.PixivAPI() if not hasattr(self.api, "client_secret"): Core.warn("this pixivpy3.PixivAPI version does not allow overridding client_secret; OAuth won't work properly") self.api.client_id = "MOBrBDS8blbauoSck0ZfDbtuzpyT" self.api.client_secret = "lsACyCD94FhDUtGTXi3QzcFE2uU1hqtDaKeqrdwj" self.api.requests = self.ua
def main(): api = pixivpy3.PixivAPI() api.auth(refresh_token=refresh_token) users_works = api.users_works(22612933) print(users_works)
#Pixiv clipboard downloader by noku import clipboard import asyncio import validators import urllib.request import time import _thread import pixivpy3 import urllib.parse as urlparse import json import traceback import os LINKS = [] API = pixivpy3.AppPixivAPI() PAPI = pixivpy3.PixivAPI() #configuration USERNAME = "" PASSWORD = "" RETRIES = 5 PATH = "images" META_FILEEXT = "txt" META_PATH = "meta" FILENAME_PATTERN = "{user[account]} - {title}@{id}" #downloads LINKS async def main(): while True: time.sleep(0.05)