Skip to content

feat: add username validation module for Zhihu#294

Merged
kaifcodec merged 1 commit intokaifcodec:mainfrom
P-r-e-m-i-u-m:feat/add-zhihu-module
Mar 11, 2026
Merged

feat: add username validation module for Zhihu#294
kaifcodec merged 1 commit intokaifcodec:mainfrom
P-r-e-m-i-u-m:feat/add-zhihu-module

Conversation

@P-r-e-m-i-u-m
Copy link
Contributor

Closes #293

Summary

Adds zhihu.py username validation module for Zhihu social platform.

Changes

  • Added user_scanner/user_scan/social/zhihu.py

Validation Logic

  • Uses generic_validate() with a process callback
  • Existing user: API returns "is_start" in response β†’ Result.taken()
  • Non-existing user: API returns "NotFoundException" β†’ Result.available()

Manual Testing

  • Existing: https://api.zhihu.com/books/people/excited-vczh/publications?offset=0&limit=5 β†’ returns "is_start": true
  • Non-existing: https://api.zhihu.com/books/people/thisdoesnotexist999xyz/publications?offset=0&limit=5 β†’ returns "NotFoundException"

Signed-off-by: πŸ„‚Κα΄‡α΄… πŸ„°Κ™α΄…α΄œΚŸ πŸ„°α΄α΄€πŸ„ ✧ <amanbaba9404522@gmail.com>
Copy link
Owner

@kaifcodec kaifcodec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@P-r-e-m-i-u-m I tested it and it works fine. Thank you for the contribution!

If you'd like to contribute further, feel free to look through the open issues, or add support for new sites that aren't already covered.

@kaifcodec kaifcodec merged commit 04f76e1 into kaifcodec:main Mar 11, 2026
2 checks passed
@kaifcodec kaifcodec added the user module addition PRs or issues related to new user_scan module additions label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

user module addition PRs or issues related to new user_scan module additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Module] Add username support for zhihu.py

2 participants