Coder Social home page Coder Social logo

ytpriv's Introduction

ytpriv 💾

Note: This software is not maintained and will be archived soon. I do not provide support in any way. Learn to code and fork this repository if you need a feature/bugfix.

A fast tool for exporting YouTube data using their undocumented JSON APIs.

No API keys or logins required, and no stability guarantees given.

If you find it useful, please give it a star!

Please only use this tool to the extent permitted by the YouTube ToS.

Installation

From source

Requires a Go 1.14+ toolchain.

Run go install ./cmd/ytpriv to install to $(go env GOPATH)/bin/ytpriv.

Features

ytpriv [command]
  channel     Scrape a channel
  livestream  Scrape a livestream
  playlist    Scrape a playlist
  video       Scrape a video

Channel

ytpriv channel [command]
  overview    Get overview of channel
  videos      Get full list of videos of channel
  videos_page Get videos page of channel

Livestream

ytpriv livestream [command]
  chat        Follow the live chat

Playlist

ytpriv playlist [command]
  videos      Get full list of videos in playlist
  videos_page Get page of videos of playlist

Video

ytpriv video [command]
  comments    Scrape comments of videos
  detail      Get details about a video

Attributions

Developed by @terorie

Using the amazing Go ecosystem including:

ytpriv's People

Contributors

riptl avatar dependabot-preview[bot] avatar dependabot[bot] avatar

Stargazers

Oliver avatar SDO avatar  avatar Ting-Yuan Lee avatar  avatar Tiago Carvalho avatar Nik. avatar  avatar Sematre avatar Sofian Mejjoute avatar Tristen avatar Anmol Tomer avatar David Thiel avatar Sofian Mejjoute avatar  avatar Tweetu avatar Lazaro avatar  avatar  avatar Prof avatar Muhammed Yaşar avatar  avatar ben avatar  avatar Sel avatar  avatar Odem avatar Benjamin Möckl avatar

Watchers

Odem avatar  avatar  avatar  avatar

ytpriv's Issues

Export livechat of past live streams

While following the live chat of active live streams is supported, this tool cannot export the historical live chat replays of past streams.

It should be straightforward to add.

video comments only save 10 subcomments per comment thread

Hello
I tried ytwrk with ytwrk video comments to save a video's comments to JSON and whilst it did save all threads/comments on the video, each thread only saved 10 subcomments on those comment threads, meaning it only saved the 10 subcomments on each comment thread, not saving the rest.
An example on this comment thread which has 488 subcomments, it would only save the first 10 to the json file, ignoring the rest: https://www.youtube.com/watch?v=e9dZQelULDk&lc=Ugx3Zffzf5edwiRain94AaABAg

How to build

Include instructions on how to build the CLI tool (or a Makefile).

[Scraping] Super Chats

YouTube supports real-time donations on live-streams called Super Chats. Those get a separate chat box, and include a donation currency and amount, and a small text message.

The livestream chat exporter should support dumping superchats.

Community Tab support

YouTube has a Twitter-like community tab for posting images and short text snippets with comment functionality.

Packaging

Publish the package to Snapcraft and maybe Ubuntu PPA.

Redis job queue

Use a Redis job queue to save known video IDs.
Video IDs that have never been crawled should be immediately added to the job queue.
Video IDs that haven't been crawled for some time should be re-added to the end of the job queue.

Continuous Testing

Add GitHub actions, that:

  • runs the Go test suite on every commit
  • runs the Go test suite weekly, to detect when YouTube changes their APIs, breaking compatibility

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.