This is a Python scraper for collecting urls any YouTube page.
- Install requirement(s):
- Clone repository:
git clone https://github.com/zvk/youtube-url-scraper.git
cd youtube-url-scraper
- Install dependencies:
python setup.py develop
import youtube_url_scraper
youtube_url_scraper.Scraper.scrape()
# Example: scrape news videos in France
youtube_url_scraper.Scraper.scrape("https://www.youtube.com/channel/UCYfdidRxbB8Qhf0Nx7ioOYw?gl=FR&hl=fr")
[{
"profile_name": "Lorem ipsum",
"profile_url": "/user/loremipsumdolor",
"upload_date": "1 day ago",
"video_desc": "Lorem ipsum dolor sit amet, hymenaeos sodales in, scelerisque at.",
"video_thumbnail": "https://..",
"video_time": "2:12",
"video_title": "Lorem ipsum dolor sit amet",
"video_url": "/watch?v=loR3MIpSUMgd",
"view_count": "3,151,740"
}]
- Fork the repository
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Implemented x feature'
- Push to the feature branch:
git push origin x-feature
- Open a pull request