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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file youtube_livechat_scraper_ohn0-1.0.4.tar.gz.
File metadata
- Download URL: youtube_livechat_scraper_ohn0-1.0.4.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
482a7fa1d17c07c13282c64b8c4e296e9e51b0a0c2bce453ec4848d6a332278c
|
|
| MD5 |
5101bdea9218d0c50ca6400dfbf39287
|
|
| BLAKE2b-256 |
bbc2fbb3e9437bde3f70b70f450f8feffa816a85c2696ab5637e1a8905659b11
|
File details
Details for the file youtube_livechat_scraper_ohn0-1.0.4-py3-none-any.whl.
File metadata
- Download URL: youtube_livechat_scraper_ohn0-1.0.4-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62065500c35a32322b9d3141a350a6e9b7f937d4cfdd877700e51903f04a03df
|
|
| MD5 |
c7877b15ad79e6b9c75db2afdc4ff682
|
|
| BLAKE2b-256 |
e46a5494c452af199090e28dc97bdf56ab2d0446b07f40d6d684ee7f911cf497
|