Skip to main content

No project description provided

Project description

gppt: get-pixivpy-token

PyPI Maintainability

Install

 pip install gppt

Run

  • Note: In advance, please setup google-chrome-stable + selenium + webdriver
  • On Ubuntu, my setup script is available
 ./setup.sh

From Library

from gppt import selenium as s
gpt = s.GetPixivToken(headless=True, user="...", pass_="...")
res = gpt.login()
  • res.response returns
{
    "access_token":"***",
    "expires_in":3600,
    "refresh_token":"***",
    "scope":"",
    "token_type":"bearer",
    "user":{
        "account":"***",
        "id":"***",
        "is_mail_authorized":"bool",
        "is_premium":"bool",
        "mail_address":"***@***",
        "name":"***",
        "profile_image_urls":{
            "px_16x16":"https://s.pximg.net/common/images/no_profile_ss.png",
            "px_170x170":"https://s.pximg.net/common/images/no_profile.png",
            "px_50x50":"https://s.pximg.net/common/images/no_profile_s.png"
        },
        "require_policy_agreement":"bool",
        "x_restrict":2
    }
}

From CLI

 gppt login
[!]: The browser will start. Please login.
(Log in to Pixiv from the login screen that starts up.)
[+]: Success!
access_token: ***
refresh_token: ***
expires_in: 3600

Help

 gppt -h
usage: gppt [-h] {login,l,login-headless,lh,refresh,r} ...

Get your Pixiv token (for running upbit/pixivpy)

positional arguments:
  {login,l,login-headless,lh,refresh,r}
    login (l)           retrieving auth token
    login-headless (lh)
                        `login` in headless mode
    refresh (r)         refresh tokens

optional arguments:
  -h, --help            show this help message and exit
 gppt l -h
usage: gppt l [-h] [-u USERNAME] [-p PASSWORD]

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        your E-mail address / pixiv ID
  -p PASSWORD, --password PASSWORD
                        your current pixiv password
 gppt lh -h
usage: gppt login-headless [-h] -u USERNAME -p PASSWORD

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        your E-mail address / pixiv ID
  -p PASSWORD, --password PASSWORD
                        your current pixiv password
 gppt r -h
usage: gppt refresh [-h] refresh_token

positional arguments:
  refresh_token

optional arguments:
  -h, --help     show this help message and exit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gppt-0.4.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

gppt-0.4-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page