YouTube comments scrapper
Project description
Youtube Comment Extractor
This package scrapes comments from any Youtube video links. The comments will be further analysed and used for sentiment analysis.
The package returns a pandas dataframe.
Installation
The package can be installed via PYPI and requires python3
$ pip install git+https://github.com/linda-oranya/YT_comments_scrapper.git
$ pip install YT-comments-scrapper
Usage This libary can be used when the key interest is to retrieve comments from a YouTube link. The packages uses selenium since YouTube pages are mainly JavaScript rendered.
That means you have to add the path to your chromedriver. Pls install here : https://sites.google.com/chromium.org/driver/, if you don't have installed.
The package allows you to input video link, the range of comments you want to scrape and path to your chromedriver.
Leave the chrome tab open when extracting the comments.
Sample codes
from yt_scrapper import YtScrapper
scrapper = YtScrapper("<Youtube link>",<num_of_comments>,"<path_to_chromedriver>")
scrapper.scrape_comments()
Development
You can contribute to this project by cloning this repo and pushing to a branch for review and merging.
Or
Create an issue with the issue link: https://github.com/linda-oranya/YT_comments_scrapper/issues
License
MIT
It is a Free Software
Project details
Release history Release notifications | RSS feed
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
Hashes for YT_comments_scrapper-0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 461158b0302d8cfca8cfdb79b82721c83e93b7741ef072dcc20eca14bf74f0cc |
|
MD5 | 97e83c7887473c149f289cb83a5ac716 |
|
BLAKE2b-256 | 394d2060a164de967d50db5d3d16af100cb1ee06d7cfdfff3a5ccd9537645818 |