Zhihu QRCode Login
One line to login Zhihu by QRCode.
Usage
from zhihu_qrcode_login import login_handler
import logging
# if remember_me = True, the cookies will be saved in your disk,
# and next time you can login without scanning QRCode.
# if you pass a logger into it, it can output some useful log.
# return requests.Session
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('test')
session = login_handler.login(remember_me=True, logger=logger)
# and later you can also use get_session() to get the session.
# session = login_handler.get_session()
# use it!
# you can use get_visit_headers() to get the headers which can visit Zhihu successfully.
session.get('https://www.zhihu.com/collections/mine', headers=login_handler.get_visit_headers())
TODO
- Handle the condition that users scan the QRCode but cancel the login confirmation.
- Find more elegant approach to open and close the QRCode.
Metadata
Release files for Zhihu-QRCode-Login 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Zhihu QRCode Login-0.0.2.tar.gz | 4.8 kB | Without provenance | Details for Zhihu QRCode Login-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Zhihu_QRCode_Login-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for Zhihu_QRCode_Login-0.0.2-py3-none-any.whl |
Total release size: 11.4 kB
Release files / Zhihu QRCode Login-0.0.2.tar.gz
| Download URL | Zhihu QRCode Login-0.0.2.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a516804f60e9134272ecf4f65b0800cf4cfdb424d485185a7de06bf8f9664aad
|
|
BLAKE2b-256 checksum How to use checksums |
36398dd9ac04accb027397692bb1977bc37e9fcf00f0157650d99d7dff6b7c34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.0
|
Release files / Zhihu_QRCode_Login-0.0.2-py3-none-any.whl
| Download URL | Zhihu_QRCode_Login-0.0.2-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa778890713cd9621a486423a204747377d79395544bab62729ce786b4a9a461
|
|
BLAKE2b-256 checksum How to use checksums |
976ded1d0018b7b746626818cbf4b8ae12f5f8b9d24085db347f20e71122a2b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.0
|
Security for Zhihu-QRCode-Login 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.