A feature-rich command-line audio/video downloader
[youtube] Added 'subscriber_count' to extraction
Joel Pottsb84071c0a914
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.pyindex 02f3ab61ae..f0d2a8873c 100644--- a/youtube_dl/extractor/youtube.py+++ b/youtube_dl/extractor/youtube.py@@ -39,6 +39,7 @@ from ..utils import (mimetype2ext,orderedSet,parse_codecs,+ parse_count,parse_duration,remove_quotes,remove_start,@@ -2421,6 +2422,14 @@ class YoutubeIE(YoutubeBaseInfoExtractor):video_duration = parse_duration(self._html_search_meta('duration', video_webpage, 'video duration'))+ # Get Subscriber Count of channel+ subscriber_count = parse_count(self._search_regex(+ r'"text":"([\d\.]+\w?) subscribers"',+ video_webpage,+ 'subscriber count',+ default=None+ ))+# annotationsvideo_annotations = Noneif self._downloader.params.get('writeannotations', False):@@ -2558,6 +2567,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):'album': album,'release_date': release_date,'release_year': release_year,+ 'subscriber_count': subscriber_count,}