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 python packages:

  • Python3

  • BeautifulSoup

  • Requests

  • 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.1.tar.gz (15.0 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.1-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for youtube_livechat_scraper_ohn0-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a69691ca0751cfd6cffa99542cccff237d4447736b9ed71f6b583f877ecb32dc
MD5 459b44f372bf0ef75370b5bde78a01bf
BLAKE2b-256 88281ffbc50856746ea9026c9d5695444ef1f46bbf2f1b5bb89aeb7a56c50b61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for youtube_livechat_scraper_ohn0-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e0c025187f9988df7b55874b78462d0a67f6a30bb70b892894214438f768167
MD5 28aea14d4b63f7ae708f89ad8155dbbf
BLAKE2b-256 d05133af32f99ef8ec5256226d58043b0bfaf0954ffbf9edc84601209fd4893d

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