python的twitch模块

twitch-python的Python项目详细描述


抽搐Python

DiscordBuild Status

pip install --user twitch-python

一种面向对象的方法,用于访问TwitchAPI,并使用关系和智能缓存进行实时聊天。

要求

使用量

# Twitch APIimporttwitchhelix=twitch.Helix('client-id')
# Usersforuserinhelix.users('sodapoppin','reckful',24250859):print(user.display_name)print(helix.user('zarlach').display_name)
# Videosforvideoinhelix.videos([318017128,317650435]):print(video.title)print(helix.video(318017128).title)
# Video Comments (VOD chat)forcommentinhelix.video(318017128).comments:print(comment.commenter.display_name)forvideo,commentsinhelix.videos([318017128,317650435]).comments:forcommentincomments:print(comment.commenter.display_name,comment.message.body)forvideo,commentsinhelix.user('sodapoppin').videos().comments:forcommentincomments:print(comment.commenter.display_name,comment.message.body)foruser,videosinhelix.users('sodapoppin','reckful').videos(first=5):forvideo,commentsinvideos.comments:forcommentincomments:print(comment.commenter.display_name,comment.message.body)
# Twitch Chattwitch.Chat(channel='#sodapoppin',nickname='zarlach',oauth='oauth:xxxxxx').subscribe(lambdamessage:print(message.channel,message.user.display_name,message.text))

功能

  • 面向对象关系
  • 智能缓存
  • 新的Twitch API(螺旋)
  • 来自Twitch API V5的视频点播聊天

DocumentationTwitch APITwitch-Chat-Downloader

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

推荐PyPI第三方库


热门话题
java如何在不打开outlook邮件的情况下将HTML表单发送到电子邮件?   jar查找所需的最小java类路径   java如何将字符串变量转换为布局变量?   java Spring安全性在localhost上工作,但在服务器上的docker中给出了“403禁止”   java PDFBox在提取字体时引发索引越界异常   Eclipse/Java:有没有办法重新扫描路径,以便Eclipse不会显示错误?   DB从11G升级到19C以及ojdbc14升级到ojdbc8后出现java关闭连接问题   java使用jsp从数据库中删除行   JLabel中JList中的swing JAVA显示项   java Android从第二个类调用类函数   java是否将焦点赋予不是焦点窗口子级的面板?   java无法使用改型作为原始JSON发布数据   java如何从ArrayList填充JComboBox   java iText如何将条形码添加到文档(com.itextpdf.text.Document)?   java Dagger2没有完全解决依赖关系