tweakers.net的python包装器

tweakers的Python项目详细描述


调整器

Build StatuscodecovPyPIPyPI - Python Version

用于tweakers.net

的python包装器

安装

pip install tweakers

用法

import tweakers

收集

使用tweakers.gathering模块,您可以访问论坛。

活动主题

for topic in tweakers.gathering.active_topics():
    print(topic.title)

搜索

for topic in tweakers.gathering.search('tweakers.net'):
    print(topic.title)

主题

获取特定主题的评论

topic = Topic("https://gathering.tweakers.net/forum/list_messages/1551828")
for comment in topic.comments(page=1):
    print(comment.user.name, comment.text)

添加评论时生成新评论

for comment in topic.comment_stream():
    print(comment.user.name, comment.text)

登录

tweakers.login("YOUR_USERNAME", "YOUR_PASSWORD")

现在您可以访问已注销用户无法访问的页面:

for topic in tweakers.gathering.bookmarks():
    print(topic.name)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何创建比较器   java将所有接口读入列表   java Android Studio在Webview中隐藏特定URL的操作栏   java如何在春季从云存储中生成URL文件而无需持续时间   icalendar如何使用Java以日历格式发送ics电子邮件附件?   如果textfield包含数字,则在运行时进行java检查   java util日志属性中何时需要“.level”?   java在一个字符串中显示json   跨平台日志系统的java Log4j替代方案   coldfusion在Lucee上安装Cassandra Java驱动程序   SpringWebMVC4Java配置不工作   windows使用java程序添加环境变量,并且能够在我从计算机打开“环境”选项卡时看到   java未设置变量和方法   mysql在java中通过查询更改数据库的现有行   java如何使用递归方法查找所有可能的数字   java如何使非原语类成员不可变   java将信息从输入按钮传递到标签