All Projects → lzjun567 → Zhihu Api

lzjun567 / Zhihu Api

Licence: mit
Zhihu API for Humans

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Zhihu Api

Zhihu Oauth
尝试解析出知乎官方未开放的 OAuth2 接口,并提供优雅的使用方式,作为 zhihu-py3 项目的替代者,目前还在实验阶段
Stars: ✭ 1,237 (+35.78%)
Mutual labels:  api, zhihu
Zhihu zhuanlan apis
知乎专栏API分析
Stars: ✭ 179 (-80.35%)
Mutual labels:  api, zhihu
Swiftdailyapi
A Swift API framework for ZhiHu's Daily News.
Stars: ✭ 204 (-77.61%)
Mutual labels:  api, zhihu
Meaju
meaju is a free link shortener from Germany, which everyone can install on his own server.
Stars: ✭ 13 (-98.57%)
Mutual labels:  api
Falko Api
📈 Falko API: Plataform for agile projects management 📊
Stars: ✭ 13 (-98.57%)
Mutual labels:  api
Xlnt
📊 Cross-platform user-friendly xlsx library for C++11+
Stars: ✭ 876 (-3.84%)
Mutual labels:  api
Hashapi Lib Node
Tierion Hash API client library for Node.js
Stars: ✭ 20 (-97.8%)
Mutual labels:  api
Geochile
Esta es una api de Geocodificación, para que, con las coordenadas Latitud y Longitud se entregue una lista de ciudades cercanas.
Stars: ✭ 13 (-98.57%)
Mutual labels:  api
E Commerce 2 django
Guest register, user register, user login, user logout, account home page, product view history, change password, reset password, change name, send activation email when register, resend activation email, add shipping address, add billing address, add nickname to the addresses, edit shipping address, edit billing address, view list of your addresses, reuse shipping addresses when order products, reuse billing addresses when ordeer products, show sales analytics if staff or admin only using -chart.js-, get analytics data with Ajax, receive marketing email, change if user will receive marketing email or not by admin, send contact message with Ajax, products list, product detail, download product detail as a PDF file, download digital product files -if the user purchased that digital product only-, orders list, list of digital products files, order detail, download order detail as a PDF file, verify order ownership with Ajax -to secure order detail page-, show cart products, add or remove product from cart, checkout page, thanks page when order placed successfully, add or reuse payment method, add or reuse payment method with Ajax, search products by title, search products by description, search products by price, search products by tag title, write tags for products -by admin only-, auto fill contact email, full name if user logged in.
Stars: ✭ 20 (-97.8%)
Mutual labels:  api
Weixinbot
网页版微信API,包含终端版微信及微信机器人
Stars: ✭ 6,903 (+657.74%)
Mutual labels:  api
Shgf
Simple HTTP golang framework
Stars: ✭ 13 (-98.57%)
Mutual labels:  api
Currencyviewer
Short python framework that dynamically displays and converts the cryptocurrencies in your Kraken wallet into equivalents fiat money.
Stars: ✭ 13 (-98.57%)
Mutual labels:  api
Covid 19 Api
Covid-19 Virus Data API from Johns Hopkins CSSE
Stars: ✭ 15 (-98.35%)
Mutual labels:  api
Stocks
Haskell library for the IEX trading API: https://iextrading.com/developer/docs/
Stars: ✭ 13 (-98.57%)
Mutual labels:  api
Anabelle
👸 API documentation generator (JSON-RPC / REST)
Stars: ✭ 20 (-97.8%)
Mutual labels:  api
Office365 Management Api Elk
An API connector for the Office 365 Management API and the Elastic Stack
Stars: ✭ 13 (-98.57%)
Mutual labels:  api
Express Knex Objection
A simple API system on a pg database, using knex and objection to simplify connection and management
Stars: ✭ 20 (-97.8%)
Mutual labels:  api
Nhversion
NHVersion for version your api
Stars: ✭ 13 (-98.57%)
Mutual labels:  api
Veeqo api ruby
Ruby gem for Veeqo API
Stars: ✭ 13 (-98.57%)
Mutual labels:  api
Active Forks
Find active github forks of a repo https://git.io/vSnrC
Stars: ✭ 879 (-3.51%)
Mutual labels:  api

zhihu-api

travis license

关于

Zhihu-API 的初衷是希望提供一套简洁、优雅的、Pythonic的API接口,面向的用户是对知乎数据有兴趣的群体,它可以用在数据分析、数据挖掘、增长黑客、以及希望通过程序自动完成知乎某个操作等应用场景。

注意:只支持Python3

安装

pip install -U zhihu
# 或者安装最新包
pip install git+git://github.com/lzjun567/zhihu-api --upgrade

快速上手

from zhihu import User
zhihu = User()

#获取用户基本信息
profile = zhihu.profile(user_slug="xiaoxiaodouzi")
print(profile)

>>>
{
    'name': '我是x',
     'headline': '程序员',
     'gender': -1,
     'user_type': 'people',
     'is_advertiser': False,
     'url_token': 'xiaoxiaodouzi',
     'id': '1da75b85900e00adb072e91c56fd9149',
     'is_org': False
}

# 发送私信
>>> zhihu.send_message(content="私信测试", user_slug="xiaoxiaodouzi")
<Response [200]>

# 关注用户
>>> zhihu.follow(user_slug="xiaoxiaodouzi")
{'follower_count': 12, 'followed': True}

# 取消关注
>>> zhihu.unfollow(user_slug="xiaoxiaodouzi")
{'follower_count': 11, 'followed': False}


>>> from zhihu import Answer
>>> answer = Answer(url="https://www.zhihu.com/question/62569341/answer/205327777")

# 赞同回答
>>> answer.vote_up()
{'voting': 1, 'voteup_count': 260}

# 反对
>>> answer.vote_down()
{'voting': -1, 'voteup_count': 259}

# 中立
>>> answer.vote_neutral()
{'voting': 0, 'voteup_count': 260}

# 感谢回答
>>> answer.thank()
{'is_thanked': True}

# 取消感谢
>>> answer.thank_cancel()
{'is_thanked': False}

# 提取回答中的图片
>>> answer.images(path="images")
['8160c14ea69b3a6674152f2c1ae6cd7a_b.jpg']


>>> from zhihu import User
>>> zhihu = User()
# 关注用户
>>>zhihu.follow(user_slug="zhijun-liu")

# 取消关注
>>>zhihu.unfollow(user_slug="zhijun-liu")

# 粉丝列表
>>> zhihu.followers(user_slug="zhijun-liu")



贡献者

欢迎 PR, 所有贡献者都将出现在这里,排名不分先后

交流

群已经加不进,可以先加微信:lzjun567 拉你入群

群

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].