zhihu API
UNOFFICIAL API for zhihu. This package supports only Python 3.x.
A Node.js implementation is also available.
Installation
$ pip install zhihuapi
Quich Start
import zhihuapi as api
with open('cookie') as f:
api.cookie(f.read())
data = api.user('zhihuadmin').profile()
print(data)
The result is:
{
"url_token": "zhihuadmin",
"avatar_url": "https://pic3.zhimg.com/34bf96bf5584ac4b5264bd7ed4fdbc5a_is.jpg",
"avatar_url_template": "https://pic3.zhimg.com/34bf96bf5584ac4b5264bd7ed4fdbc5a_{size}.jpg",
"type": "people",
"name": "知乎小管家",
"headline": "欢迎反馈问题和建议!",
"is_org": false,
"url": "https://www.zhihu.com/people/zhihuadmin",
"badge": [
{
"type": "identity",
"description": "知乎官方帐号"
}
],
"user_type": "people",
"is_advertiser": false,
"id": "3d198a56310c02c4a83efb9f4a4c027e"
}
License
MIT
Metadata
Release files for zhihuapi 0.6.0
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 |
|---|---|---|---|---|
| zhihuapi-0.6.0.tar.gz | 10.1 kB | Without provenance | Details for zhihuapi-0.6.0.tar.gz |
Release files / zhihuapi-0.6.0.tar.gz
| Download URL | zhihuapi-0.6.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
432970d47ac75d045bda16047d170db063b89539d10fa1c60f8256ea8cb606ad
|
|
BLAKE2b-256 checksum How to use checksums |
444b09f9e0f4f552658d200f5be3bd81ffacd1ae87a25142a79225d92d953f56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for zhihuapi 0.6.0
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.