aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dlc/extractor
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dlc/extractor')
-rw-r--r--youtube_dlc/extractor/generic.py3
-rw-r--r--youtube_dlc/extractor/itv.py1
-rw-r--r--youtube_dlc/extractor/mitele.py1
-rw-r--r--youtube_dlc/extractor/twitch.py2
-rw-r--r--youtube_dlc/extractor/wdr.py2
-rw-r--r--youtube_dlc/extractor/youtube.py8
6 files changed, 10 insertions, 7 deletions
diff --git a/youtube_dlc/extractor/generic.py b/youtube_dlc/extractor/generic.py
index 6246b8a83..6b4c84261 100644
--- a/youtube_dlc/extractor/generic.py
+++ b/youtube_dlc/extractor/generic.py
@@ -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 (
diff --git a/youtube_dlc/extractor/itv.py b/youtube_dlc/extractor/itv.py
index b767ca0dd..4122ac880 100644
--- a/youtube_dlc/extractor/itv.py
+++ b/youtube_dlc/extractor/itv.py
@@ -2,7 +2,6 @@
from __future__ import unicode_literals
import json
-import re
from .common import InfoExtractor
from .brightcove import BrightcoveNewIE
diff --git a/youtube_dlc/extractor/mitele.py b/youtube_dlc/extractor/mitele.py
index 0b240d27f..b5937233b 100644
--- a/youtube_dlc/extractor/mitele.py
+++ b/youtube_dlc/extractor/mitele.py
@@ -1,6 +1,5 @@
# coding: utf-8
from __future__ import unicode_literals
-import json
from .telecinco import TelecincoIE
from ..utils import (
diff --git a/youtube_dlc/extractor/twitch.py b/youtube_dlc/extractor/twitch.py
index 34892d69d..ab131a07d 100644
--- a/youtube_dlc/extractor/twitch.py
+++ b/youtube_dlc/extractor/twitch.py
@@ -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'),
diff --git a/youtube_dlc/extractor/wdr.py b/youtube_dlc/extractor/wdr.py
index 5cb5924f8..9658ecea7 100644
--- a/youtube_dlc/extractor/wdr.py
+++ b/youtube_dlc/extractor/wdr.py
@@ -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'] = [{
diff --git a/youtube_dlc/extractor/youtube.py b/youtube_dlc/extractor/youtube.py
index c67ecde04..59e5bc2ab 100644
--- a/youtube_dlc/extractor/youtube.py
+++ b/youtube_dlc/extractor/youtube.py
@@ -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