Giter Site home page Giter Site logo

colorworlds / bilibili-danmuji Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dynamicfire/bilibili-danmuji

0.0 1.0 0.0 74 KB

A simple python script that reads danmu (bullet-screen comments) from bilibili live

License: Apache License 2.0

Python 100.00%

bilibili-danmuji's Introduction

弹幕鸡

用于从bilibili直播中报弹幕的Python脚本

依赖环境

  1. 依赖环境:Python 2.7 到 3.7 版本。
  2. 从 腾讯云控制台 开通语音合成产品。
  3. 获取AppID, SecretID以及SecretKey

截图

1

相关配置

在 danmu.py 中,第24行:

class Danmu():
    def __init__(self):
        self.url = "https://api.live.bilibili.com/ajax/msg"
        self.headers ={
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:65.0) Gecko/20100101 Firefox/65.0",
            "Referer": "https://live.bilibili.com/901625?spm_id_from=333.334.b_62696c695f6c697665.13",
            }
        self.data = {
            "roomid":"_", #将'_'替换为你想要的抓取弹幕直播间的roomid
            "csrf_token":"",	
            "csrf":"",	
            "visit_id":""
            }

roomid处填入想要的抓取弹幕直播间的roomid

在 conf/tcloud_auth.ini 中,填入获取的AppID, SecretID以及SecretKey


danmuji

A simple python script that reads danmu (bullet-screen comments) from bilibili live broadcast aloud

Environment

  1. Python 2.7 to 3.7
  2. Activate TTS products from Tencent Cloud Console.
  3. Get AppID, SecretID and SecretKey

Screenshot

1

Configuration

Line 24, danmu.py:

class Danmu():
    def __init__(self):
        self.url = "https://api.live.bilibili.com/ajax/msg"
        self.headers ={
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:65.0) Gecko/20100101 Firefox/65.0",
            "Referer": "https://live.bilibili.com/901625?spm_id_from=333.334.b_62696c695f6c697665.13",
            }
        self.data = {
            "roomid":"_", #replace '_' with roomid
            "csrf_token":"",    
            "csrf":"",  
            "visit_id":""
            }

Fill in the 'roomid' with the desired room id

In conf/tcloud_auth.ini, fill in the AppID, SecretID and SecretKey

bilibili-danmuji's People

Contributors

dynamicfire avatar

Watchers

 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.