python 420chan api包装器。基于BASC-PY4CHAN 4CHAN API包装。
py420chan的Python项目详细描述
Anonoma图书馆的420chan API的完整python包装器。 使用请求,如果在更新线程时修改了自头,则会尊重。 缓存线程对象。有趣的东西。
如果你想与4chan接口或从4chan上刮下,绝对必须, 使用python脚本。
您可以使用以下命令安装此库straight from PyPi:
pip install py420chan
获取帮助
如果您需要帮助,或者您在使用这个库时遇到一些问题,我们的主要irc频道 是#bibanon on irc.rizon.net。简单的头部 在那里和丹或安东尼松谈谈。否则,您可以在我们的Github Issue Tracker上提出问题,我们会尽快答复 我们可以!
用法
importpy420channom=py420chan.Board('nom')thread=nom.get_thread(423491034)print(thread)forfileinthread.file_objects():print(file.file_url)# In a while...print("I fetched",thread.update(),"new replies.")
文档
这个库主要扩展BASC-py4chan的类,但有一些不同。有关更多信息,请参阅Py8Chan文档。
注意,有些函数没有在420chan api中实现。这些函数将raise an AttributeError when used.
- 省略了“posts”这个特性的缺乏迫使我们放弃
expand()
,转而使用update()
。 - 省略的图像-由于缺少
omitted
属性,因此repr
不再报告它们。 - 文件删除-如果图像被删除,它将仅404。
- 扰流器
- 图片-没有线程中所有图片的总和。
- 颠簸极限
许可证
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO.