Coder Social home page Coder Social logo

douyincap's Introduction

DouyinCap

借助 PuppeteerSharp 无头浏览器实现的抖音直播弹幕爬虫, 支持使用 HTTP 向其他程序发送弹幕数据

使用

程序至少需要传入一个整数作为直播间id, 例如一个直播间的地址是 https://live.douyin.com/114514, 那么直播间 id 是 114514.

DouyinCap 114514  # 使用这条指令来启动程序开始抓取 114514 直播间的弹幕数据.

如果需要显示浏览器, 则传入 --show-browser

DouyinCap --show-browser 114514

数据发送

向程序传入一个 HTTP 地址, 程序会将弹幕数据通过 POST 的形式发送到指定地址

# 使用这条指令来抓取 114514 直播间数据, 并将每一条直播间数据发送到 http://127.0.0.1:1145
DouyinCap --post-addr http://127.0.0.1:1145 114514

POST 数据的结构:

{
  "Name": "发送者用户名",
  "Value": "弹幕内容",
}

已知问题

  1. 如果进程被强制退出, 例如使用任务管理 kill 掉进程, 那么抓取数据所用的浏览器并不会被自动关闭

正常使用 Ctrl+C 或鼠标关闭窗口是会自动关闭浏览器的.

douyincap's People

Contributors

slimenull 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.