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 login -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.3.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gppt-0.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file gppt-0.3.tar.gz.

File metadata

  • Download URL: gppt-0.3.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for gppt-0.3.tar.gz
Algorithm Hash digest
SHA256 c73a0f721f61437bbc3a376eca24ffd69ce58e4fef86c76d71b29b4fb7b49f5a
MD5 4619d1a8147fe5e6855bcd744fdca748
BLAKE2b-256 fa33ccf36b80810ccef15d902e0ff685b9a3573259b7b239432441c726708660

See more details on using hashes here.

File details

Details for the file gppt-0.3-py3-none-any.whl.

File metadata

  • Download URL: gppt-0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for gppt-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8296cb4fe3f14c23a3088de500ff58f4992111aabba1bf8da6119697591a497a
MD5 6decf81117306c750dea367cc13aa0a0
BLAKE2b-256 1dd53119c4c95f2ff985739445f30bd543a4133d5aecc00e1f6f5e01c912dc0e

See more details on using hashes here.

Supported by

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