Skip to main content

One line to login Zhihu by QRCode.

Project description

Zhihu QRCode Login

One line to login Zhihu by QRCode.

Usage

from zhihu_qrcode_login import login_handler

# if remember_me = True, the cookies will be saved in your disk, 
# and next time you can login without scanning QRCode.
# return requests.Session
session = login_handler.login(remember_me=True)
# 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

  1. After users scan the QRCode and confirm login on their devices, close the QRCode automatically.

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

Zhihu QRCode Login-0.0.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

Zhihu_QRCode_Login-0.0.1-py3-none-any.whl (6.3 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