Get your Pixiv token (for running upbit/pixivpy)
Project description
gppt
: get-pixivpy-token
- Get your Pixiv token (for running upbit/pixivpy)
- Refine pixiv_auth.py + its fork
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 login [-h] [-u USERNAME] [-p PASSWORD] [-j]
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
-j, --json output response as json
❭ gppt lh -h
usage: gppt login-headless [-h] -u USERNAME -p PASSWORD [-j]
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
-j, --json output response as json
❭ gppt r -h
usage: gppt refresh [-h] [-j] refresh_token
positional arguments:
refresh_token
optional arguments:
-h, --help show this help message and exit
-j, --json output response as json
Project details
Release history Release notifications | RSS feed
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.5.tar.gz
(6.6 kB
view details)
Built Distribution
gppt-0.5-py3-none-any.whl
(7.2 kB
view details)
File details
Details for the file gppt-0.5.tar.gz
.
File metadata
- Download URL: gppt-0.5.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fac256b3a745b3107ab61846671d1d5f020a2634c33f6779c3ce86ad7e78f73 |
|
MD5 | faa86db2c10f43cf02584caa02fb41e6 |
|
BLAKE2b-256 | 3406616182050d89e389eb329a8114c7778488802c74e5c01d7f5cd27fecd404 |
File details
Details for the file gppt-0.5-py3-none-any.whl
.
File metadata
- Download URL: gppt-0.5-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2033d7ac6c7967330a6be4142c7b1a02184595e76ee67d694d6d55e1cf4477a0 |
|
MD5 | d36a12bc4f9aff03c606d62d31898a38 |
|
BLAKE2b-256 | d18455de65c281eee3dd1eccc6f0e8bba8b5c9e62ccd35104947f4620a730275 |