This library provides with a class, Scraper
, that will take most of the information present on a video page.
The project is still in beta and will be fully updated when I will have time. I will add a documentation later.
In order to install, just use pip install YoutubeScraper
. 😄 All pre-requisites will be installed.
WARNING I guarantee it works only with python 3
or above. In the future, I will try to port it to all versions, if possible.
In order to start, one should invoke a Scraper
object. Here listed are the variables one can use:
- id: to identify the video. Without it, the Scraper will not work. By default, it's
None
. - driver: method to give the driver to work. As for today, only Chrome has been tested successfully.
- scrape: either
True
orFalse
. If false, no scraping will be implemented after construction. By default,True
. - close_on_complete: either
True
orFalse
. IfTrue
, the program will quit the webpage. If one has to implement the scraping of many pages, I suggest to put asFalse
. - comments_to_scrape: maximum number of comments that will be scraped. If nothing is given, all visible will be scraped.
As of today, with the method as_dict()
, results as dictionary can be obtained. Maybe I will implement more in the future.
Feel free to contact me, either for info or bugs. 😊
@ 2020, Leonardo Alchieri