Giter Site home page Giter Site logo

kometube's Introduction

KomeTube

讀取Youtube Live聊天室留言
提供投票統計、文字猜謎、評分等互動功能

操作方法:

  1. 左上角輸入直播影片網址
  2. 點擊開始
    開始後便會持續讀取聊天室留言並顯示於下方
    若停止後重新開始時,則只會從當下聊天室存在留言開始擷取

程式方法

  1. 由輸入的直播影片網址中取得Video ID
  2. 透過Video ID取得聊天室HTML內容與Cookie (https://www.youtube.com/live_chat?v={vid}&is_popout=1)
  3. 從HTML內容中解析出YtCfg資料、INNERTUBE_CONTEXT、INNERTUBE_API_KEY與continuation參數 (window["ytInitialData"]的值)
  4. 合併INNERTUBE_CONTEXT與continuation參數,並序列化為json
  5. 利用POST方法將INNERTUBE_CONTEXT與continuation參數代入StringContent取得聊天室留言以及下一次的continuation參數 (https://www.youtube.com/youtubei/v1/live_chat/get_live_chat?key={INNERTUBE_API_KEY})
  6. 循環利用INNERTUBE_CONTEXT與新的continuation參數取得新留言

Html TextBlock

支援同時顯示文字與圖片功能
HtmlTextBlock UI元件原始碼:
https://github.com/TheBauwssss/AdvancedHtmlTextBlock

kometube's People

Contributors

dghkd avatar jc-chung avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.