https://github.com/ohn0/youtube-livechat-scraper
grab youtube live chat data from existing VODs
https://github.com/ohn0/youtube-livechat-scraper
chat livestreaming python python3 scraper scraping-python streaming youtube
Last synced: 6 months ago
JSON representation
grab youtube live chat data from existing VODs
- Host: GitHub
- URL: https://github.com/ohn0/youtube-livechat-scraper
- Owner: ohn0
- License: mit
- Created: 2022-08-03T01:52:17.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-21T19:40:54.000Z (over 1 year ago)
- Last Synced: 2024-04-25T05:20:55.048Z (about 1 year ago)
- Topics: chat, livestreaming, python, python3, scraper, scraping-python, streaming, youtube
- Language: Python
- Homepage:
- Size: 492 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
- Purchased StickersAll 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
- RequestsHow 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