cheezone / zhihuvapi Goto Github PK
View Code? Open in Web Editor NEW优雅地玩知乎
License: MIT License
优雅地玩知乎
License: MIT License
个人关注类
这些接口可以和已有的 API 整合使用,建议添加(我不会说是我想用 = =||)
代码为
import ZhihuVAPI as zhihu
a=zhihu.Answer('https://www.zhihu.com/question/31343133/answer/58763430')
a.thank()
报错信息为:
C:\Users\Sanmo\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\packages\urllib3\connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
信息:People 对象 ba69961d293019bf085e0edb82c2cb92 (<ZhihuVAPI.content.People.People object at 0x0000019991509208>)初始 化
C:\Users\Sanmo\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\packages\urllib3\connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
信息:传入 URL 得到58763430 答案
C:\Users\Sanmo\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\packages\urllib3\connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
日志:感谢以茄之名的答案
Traceback (most recent call last):
File "C:\Users\Sanmo\Desktop\新建文本文档.py", line 4, in <module>
a.thank()
File "C:\Users\Sanmo\AppData\Local\Programs\Python\Python36\lib\site-packages\ZhihuVAPI\util\zhihu.py", line 279, in warpper
return func(self, *args, **kwargs)
File "C:\Users\Sanmo\AppData\Local\Programs\Python\Python36\lib\site-packages\ZhihuVAPI\content\Answer.py", line 83, in thank
url = urls(self, 'thank')('thank')
TypeError: <lambda>() takes 0 positional arguments but 1 was given
类似的,使用vote,down,undown这些功能都有相关错误
如题,感谢~
# 开始构造
if zhihu.test(self, 'id', id): # 传入 ID 的情况
self.init(id=id)
这里的init是什么,它不是__init__()我也没看到它的实现。
谢谢您的解答
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.