mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-10 18:25:22 +00:00
Preparing for release
This commit is contained in:
@@ -20,12 +20,14 @@ from ..utils import (
|
||||
ExtractorError,
|
||||
float_or_none,
|
||||
HEADRequest,
|
||||
int_or_none,
|
||||
is_html,
|
||||
js_to_json,
|
||||
KNOWN_EXTENSIONS,
|
||||
merge_dicts,
|
||||
mimetype2ext,
|
||||
orderedSet,
|
||||
parse_duration,
|
||||
sanitized_Request,
|
||||
smuggle_url,
|
||||
unescapeHTML,
|
||||
@@ -35,6 +37,7 @@ from ..utils import (
|
||||
url_or_none,
|
||||
xpath_attr,
|
||||
xpath_text,
|
||||
xpath_with_ns,
|
||||
)
|
||||
from .commonprotocols import RtmpIE
|
||||
from .brightcove import (
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import json
|
||||
import re
|
||||
|
||||
from .common import InfoExtractor
|
||||
from .brightcove import BrightcoveNewIE
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
import json
|
||||
|
||||
from .telecinco import TelecincoIE
|
||||
from ..utils import (
|
||||
|
||||
@@ -324,7 +324,7 @@ def _make_video_result(node):
|
||||
return {
|
||||
'_type': 'url_transparent',
|
||||
'ie_key': TwitchVodIE.ie_key(),
|
||||
'id': 'v'+ video_id,
|
||||
'id': 'v' + video_id,
|
||||
'url': 'https://www.twitch.tv/videos/%s' % video_id,
|
||||
'title': node.get('title'),
|
||||
'thumbnail': node.get('previewThumbnailURL'),
|
||||
|
||||
@@ -47,6 +47,7 @@ class WDRIE(InfoExtractor):
|
||||
media_resource = metadata['mediaResource']
|
||||
|
||||
formats = []
|
||||
subtitles = {}
|
||||
|
||||
# check if the metadata contains a direct URL to a file
|
||||
for kind, media in media_resource.items():
|
||||
@@ -93,7 +94,6 @@ class WDRIE(InfoExtractor):
|
||||
|
||||
self._sort_formats(formats)
|
||||
|
||||
subtitles = {}
|
||||
caption_url = media_resource.get('captionURL')
|
||||
if caption_url:
|
||||
subtitles['de'] = [{
|
||||
|
||||
@@ -3342,7 +3342,7 @@ class YoutubeTabIE(YoutubeBaseInfoExtractor):
|
||||
if is_home is not None and is_home.group('not_channel') is None and item_id != 'feed':
|
||||
self._downloader.report_warning(
|
||||
'A channel/user page was given. All the channel\'s videos will be downloaded. '
|
||||
'To download only the videos in the home page, add a "/home" to the URL')
|
||||
'To download only the videos in the home page, add a "/featured" to the URL')
|
||||
url = '%s/videos%s' % (is_home.group('pre'), is_home.group('post') or '')
|
||||
|
||||
# Handle both video/playlist URLs
|
||||
@@ -3464,6 +3464,7 @@ class YoutubePlaylistIE(InfoExtractor):
|
||||
|
||||
|
||||
class YoutubeYtBeIE(InfoExtractor):
|
||||
IE_DESC = 'youtu.be'
|
||||
_VALID_URL = r'https?://youtu\.be/(?P<id>[0-9A-Za-z_-]{11})/*?.*?\blist=(?P<playlist_id>%(playlist_id)s)' % {'playlist_id': YoutubeBaseInfoExtractor._PLAYLIST_ID_RE}
|
||||
_TESTS = [{
|
||||
'url': 'https://youtu.be/yeWKywCrFtk?list=PL2qgrgXsNUG5ig9cat4ohreBjYLAPC0J5',
|
||||
@@ -3503,6 +3504,7 @@ class YoutubeYtBeIE(InfoExtractor):
|
||||
|
||||
|
||||
class YoutubeYtUserIE(InfoExtractor):
|
||||
IE_DESC = 'YouTube.com user videos, URL or "ytuser" keyword'
|
||||
_VALID_URL = r'ytuser:(?P<id>.+)'
|
||||
_TESTS = [{
|
||||
'url': 'ytuser:phihag',
|
||||
@@ -3647,12 +3649,12 @@ class YoutubeSearchIE(SearchInfoExtractor, YoutubeBaseInfoExtractor):
|
||||
class YoutubeSearchDateIE(YoutubeSearchIE):
|
||||
IE_NAME = YoutubeSearchIE.IE_NAME + ':date'
|
||||
_SEARCH_KEY = 'ytsearchdate'
|
||||
IE_DESC = 'YouTube.com searches, newest videos first'
|
||||
IE_DESC = 'YouTube.com searches, newest videos first, "ytsearchdate" keyword'
|
||||
_SEARCH_PARAMS = 'CAI%3D'
|
||||
|
||||
|
||||
class YoutubeSearchURLIE(YoutubeSearchIE):
|
||||
IE_DESC = 'YouTube.com search URLs'
|
||||
IE_DESC = 'YouTube.com searches, "ytsearch" keyword'
|
||||
IE_NAME = YoutubeSearchIE.IE_NAME + '_url'
|
||||
_VALID_URL = r'https?://(?:www\.)?youtube\.com/results\?(.*?&)?(?:search_query|q)=(?:[^&]+)(?:[&]|$)'
|
||||
# _MAX_RESULTS = 100
|
||||
|
||||
Reference in New Issue
Block a user