explaingit

xchaoinfo/fuck-login

5,876PythonAudience · developerComplexity · 2/5Setup · moderate

TLDR

A collection of Python scripts that automate logging in to about 20 popular Chinese websites, useful as reference code for understanding how sites like Zhihu, Weibo, and Bilibili handle authentication for scraping.

Mindmap

mindmap
  root((fuck-login))
    What it does
      Login automation
      Web scraping helper
      Auth reference code
    Tech stack
      Python
      requests
      Pillow
      rsa
    Sites covered
      Zhihu
      Weibo and Baidu
      Bilibili
      JD.com
    Auth patterns
      Password encryption
      CAPTCHA handling
      Session cookies
    Status
      Unmaintained since 2016
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Use as reference code to understand how a specific Chinese site's login flow works before writing your own scraper.

USE CASE 2

Learn how to handle CAPTCHA images, RSA-encrypted passwords, and custom session cookies in Python web scraping.

USE CASE 3

Build a data collection script for a Chinese website that requires a logged-in session to access any content.

Tech stack

PythonrequestsPillowrsa

Getting it running

Difficulty · moderate Time to first run · 30min

Project is unmaintained since 2016, some login flows may be broken as target sites have updated their authentication systems.

In plain English

This Python project provides scripts that automate the login process for a collection of popular Chinese websites. The purpose is to help developers who want to scrape or collect data from sites that require a logged-in session before any content becomes accessible. Logging in programmatically is often the first and most tedious step in that kind of work. The repository includes login implementations for around 20 sites, including Zhihu (a Q&A platform similar to Quora), Weibo (a microblogging service), Baidu, Douban, Bilibili, JD.com (an e-commerce site), and several others. Each implementation handles the specific authentication flow that site uses, which can involve encrypted passwords, CAPTCHA images, or custom session cookies. The project relies on three Python libraries: requests for sending web requests, Pillow for processing CAPTCHA images, and rsa for handling encryption. The README is written in Chinese and includes a note at the top stating that the project is no longer maintained. It was started in 2016, and some of the login flows may have stopped working as the target websites updated their authentication systems. The author acknowledged this and noted that only a few representative cases would be kept current going forward. Contributions were accepted while the project was active, with guidelines asking for compatibility with both Python 2 and Python 3. Video tutorials were also produced and published on Chinese video platforms for beginners learning about web scraping and login automation.

Copy-paste prompts

Prompt 1
Explain how this repo's Zhihu login script handles password encryption and session cookie management using the requests and rsa libraries in Python.
Prompt 2
I want to scrape content from Bilibili but need to log in first. Based on the patterns in this repo, write a Python login function using requests that captures and reuses session cookies.
Prompt 3
How do I adapt a login script from this repo to handle a site that shows a CAPTCHA image, use Pillow to display it and let the user type the answer before submitting the form.
Open on GitHub → Explain another repo

← xchaoinfo on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.