mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-25 00:00:48 +01:00
Merge branch 'feature_subscriber_count' of https://github.com/RedpointsBots/youtube-dl into RedpointsBots-feature_subscriber_count
This commit is contained in:
commit
044ecf795d
@ -39,6 +39,7 @@
|
||||
mimetype2ext,
|
||||
orderedSet,
|
||||
parse_codecs,
|
||||
parse_count,
|
||||
parse_duration,
|
||||
remove_quotes,
|
||||
remove_start,
|
||||
@ -2450,6 +2451,14 @@ def _extract_count(count_name):
|
||||
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
|
||||
))
|
||||
|
||||
# annotations
|
||||
video_annotations = None
|
||||
if self._downloader.params.get('writeannotations', False):
|
||||
@ -2587,6 +2596,7 @@ def decrypt_sig(mobj):
|
||||
'album': album,
|
||||
'release_date': release_date,
|
||||
'release_year': release_year,
|
||||
'subscriber_count': subscriber_count,
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user