A scraper for videos that are trending on YouTube (https://www.youtube.com/feed/trending)
This is a Python scraper for YouTube’s feed of videos that are trending.
Install requirement(s):
Clone repository:
git clone https://github.com/jessecordeiro/youtube-trending-videos-scraper.git
cd youtube-trending-videos-scraper
Install dependencies:
python setup.py develop
import youtube_trending_scraper
youtube_trending_scraper.Scraper.scrape()
Domain defaults to .com if no argument is provided
# Example: scrape Canada's trending videos
youtube_trending_scraper.Scraper.scrape("ca")
[{
"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"
}]
git checkout -b my-new-feature
git commit -am 'Implemented x feature'
git push origin x-feature