Scrapes all the comments from all videos present in a YouTube channel
Can also be used to get the video list from a given YouTube channel
Linux:
#clone the repo
git clone https://github.com/animesh-chouhan/yt-comment-scraper.git
cd yt-comment-scraper
#install python3
sudo apt-get install python3
#install node and npm
sudo apt-get install nodejs
sudo apt-get install npm
#install dependencies
npm install express --save
npm install puppeteer --save
#run the api on localhost
node scraper_api.js
#testing the python scraper
python3 scraper.py ./to_scrape_sample.txt
#create a new text file with links to be scraped separated by newlines
python3 scraper.py ./your_text_file.txt
Sample resonse of api hosted on localhost:
Sample comments scraped:
For more examples and usage, please refer to the Wiki.
- Puppeteer - Headless browser to overcome pagination
- ytcomments - Comment API
- Fork the repo (https://github.com/animesh-chouhan/yt-comment-scraper/)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
MIT License copyright (c) 2019 Animesh Singh Chouhan. Please have a look at the license for more details.