Skip to content

Commit

Permalink
Merge pull request #6 from CXwudiSmall/better-thumbnail
Browse files Browse the repository at this point in the history
solve #5 - better quality thumbnail
  • Loading branch information
bbepis committed Jun 9, 2020
2 parents 6c13e44 + 8276d45 commit e950bb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion youtube_dl/extractor/niconico.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ def getWebpage(video_id, note=False):
video_detail = watch_api_data.get('videoDetail', {})

thumbnail = (
get_video_info(['thumbnail_url', 'thumbnailURL'])
self._html_search_regex(r'<meta property="og:image" content="([^"]+)">', webpage, 'thumbnail data', default=None)
or get_video_info(['largeThumbnailURL', 'thumbnail_url', 'thumbnailURL'])
or self._html_search_meta('image', webpage, 'thumbnail', default=None)
or video_detail.get('thumbnail'))

Expand Down

0 comments on commit e950bb6

Please sign in to comment.