mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-08 17:25:21 +00:00
@@ -1108,7 +1108,9 @@ class InfoExtractor:
|
||||
return self._downloader.params.get(name, default, *args, **kwargs)
|
||||
return default
|
||||
|
||||
def report_drm(self, video_id, partial=False):
|
||||
def report_drm(self, video_id, partial=NO_DEFAULT):
|
||||
if partial is not NO_DEFAULT:
|
||||
self._downloader.deprecation_warning('InfoExtractor.report_drm no longer accepts the argument partial')
|
||||
self.raise_no_formats('This video is DRM protected', expected=True, video_id=video_id)
|
||||
|
||||
def report_extraction(self, id_or_name):
|
||||
|
||||
@@ -32,6 +32,7 @@ from ..utils import (
|
||||
unified_timestamp,
|
||||
unsmuggle_url,
|
||||
url_or_none,
|
||||
variadic,
|
||||
xpath_attr,
|
||||
xpath_text,
|
||||
xpath_with_ns,
|
||||
@@ -2820,11 +2821,8 @@ class GenericIE(InfoExtractor):
|
||||
webpage)
|
||||
if mobj is not None:
|
||||
varname = mobj.group(1)
|
||||
sources = self._parse_json(
|
||||
mobj.group(2), video_id, transform_source=js_to_json,
|
||||
fatal=False) or []
|
||||
if not isinstance(sources, list):
|
||||
sources = [sources]
|
||||
sources = variadic(self._parse_json(
|
||||
mobj.group(2), video_id, transform_source=js_to_json, fatal=False) or [])
|
||||
formats = []
|
||||
subtitles = {}
|
||||
for source in sources:
|
||||
|
||||
@@ -21,6 +21,23 @@ class PrankCastIE(InfoExtractor):
|
||||
'tags': ['prank call', 'prank'],
|
||||
'upload_date': '20220825'
|
||||
}
|
||||
}, {
|
||||
'url': 'https://prankcast.com/phonelosers/showreel/2048-NOT-COOL',
|
||||
'info_dict': {
|
||||
'id': '2048',
|
||||
'ext': 'mp3',
|
||||
'title': 'NOT COOL',
|
||||
'display_id': 'NOT-COOL',
|
||||
'timestamp': 1665028364,
|
||||
'uploader': 'phonelosers',
|
||||
'channel_id': 6,
|
||||
'duration': 4044,
|
||||
'cast': ['phonelosers'],
|
||||
'description': '',
|
||||
'categories': ['prank'],
|
||||
'tags': ['prank call', 'prank'],
|
||||
'upload_date': '20221006'
|
||||
}
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..utils import (
|
||||
determine_ext,
|
||||
js_to_json,
|
||||
mimetype2ext,
|
||||
traverse_obj,
|
||||
)
|
||||
from ..utils import determine_ext, js_to_json, mimetype2ext, traverse_obj
|
||||
|
||||
|
||||
class TV24UAVideoIE(InfoExtractor):
|
||||
|
||||
@@ -1721,7 +1721,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
'live_status': 'not_live',
|
||||
'playable_in_embed': True,
|
||||
'comment_count': int,
|
||||
'channel_follower_count': int
|
||||
'channel_follower_count': int,
|
||||
'chapters': list,
|
||||
},
|
||||
'params': {
|
||||
'skip_download': True,
|
||||
@@ -1754,7 +1755,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
'live_status': 'not_live',
|
||||
'channel_url': 'https://www.youtube.com/channel/UCH1dpzjCEiGAt8CXkryhkZg',
|
||||
'comment_count': int,
|
||||
'channel_follower_count': int
|
||||
'channel_follower_count': int,
|
||||
'chapters': list,
|
||||
},
|
||||
'params': {
|
||||
'skip_download': True,
|
||||
@@ -2019,7 +2021,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
'duration': 522,
|
||||
'channel': 'kudvenkat',
|
||||
'comment_count': int,
|
||||
'channel_follower_count': int
|
||||
'channel_follower_count': int,
|
||||
'chapters': list,
|
||||
},
|
||||
'params': {
|
||||
'skip_download': True,
|
||||
@@ -2169,7 +2172,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
'like_count': int,
|
||||
'live_status': 'not_live',
|
||||
'playable_in_embed': True,
|
||||
'channel_follower_count': int
|
||||
'channel_follower_count': int,
|
||||
'chapters': list,
|
||||
},
|
||||
'params': {
|
||||
'format': '17', # 3gp format available on android
|
||||
@@ -2213,7 +2217,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
'duration': 248,
|
||||
'categories': ['Education'],
|
||||
'age_limit': 0,
|
||||
'channel_follower_count': int
|
||||
'channel_follower_count': int,
|
||||
'chapters': list,
|
||||
}, 'params': {'format': 'mhtml', 'skip_download': True}
|
||||
}, {
|
||||
# Ensure video upload_date is in UTC timezone (video was uploaded 1641170939)
|
||||
|
||||
Reference in New Issue
Block a user