Skip to main content

Livechat scraper for Youtube video streams

Project description

youtube-livechat-scraper

A tool to scrape youtube livechat data I came up with while watching vtubers. It rips almost all data from a VOD's livechat including the following:

  • Chat messages
  • Superchats
  • Memberships joined
  • Memberships gifted and received

All of the data can be wrapped up in a large raw JSON object that also contains lots of metadata from the responses, like the author, the time the message got sent, etc.

USAGE:

Requires the following python3 packages:

  • NOTE: These packages will be installed via pip when installing the scraper.
  • BeautifulSoup
  • Requests

How to use:

  • Import the LiveChatScraper from scrapers.liveChatScraper to wherever you want to make the scraping call.
  • Find a VOD URL and copy it
  • Create a LiveChatScraper object and pass in the VOD's URL.
  • Call the scrape() method on the created scraper object and the scrape will run.
  • Once the scrape is completed, you can call ouputMessages() to get a dictionary with all the scraped data.
  • You can all save the scraped data as a JSON to a fill by calling the writeToFile method passing the OUTPUT_JSON constant
  • example.py has a working example which saves the data to different formats

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youtube_livechat_scraper_ohn0-1.0.3.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

youtube_livechat_scraper_ohn0-1.0.3-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file youtube_livechat_scraper_ohn0-1.0.3.tar.gz.

File metadata

File hashes

Hashes for youtube_livechat_scraper_ohn0-1.0.3.tar.gz
Algorithm Hash digest
SHA256 7a46c5e51ccbb8e79c66eb669443fd7512c350857a9fa944e229d599080cc970
MD5 4b454a40271907e5dabdf783f48ed8cc
BLAKE2b-256 50bfc14f1fc682e7563022a8fe84b256f2cc980a582b691a961aee7a44c2a4a1

See more details on using hashes here.

File details

Details for the file youtube_livechat_scraper_ohn0-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for youtube_livechat_scraper_ohn0-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 84509cbf641b9da648d1eaeb33fedb0f990ce25d5b8027d55e09b1c8dc928b71
MD5 53d796f6966cc3db9214dce7c571fef1
BLAKE2b-256 e7970c0a2b6158085b61b384e9a500ffdf6ccb1717f181b1ed85e14ccb89c1fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page