From 63fc80005782430180ed0d13ac6ab5ca497d333a Mon Sep 17 00:00:00 2001
From: Yen Chi Hsuan
Date: Tue, 3 Mar 2015 23:17:19 +0800
Subject: [PATCH 0001/1515] [Letv] Fix test_Letv and test_Letv_1 failures in
python 3
---
youtube_dl/extractor/letv.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/youtube_dl/extractor/letv.py b/youtube_dl/extractor/letv.py
index 85eee141b..9ed81a199 100644
--- a/youtube_dl/extractor/letv.py
+++ b/youtube_dl/extractor/letv.py
@@ -88,9 +88,10 @@ class LetvIE(InfoExtractor):
play_json_req = compat_urllib_request.Request(
'http://api.letv.com/mms/out/video/playJson?' + compat_urllib_parse.urlencode(params)
)
- play_json_req.add_header(
- 'Ytdl-request-proxy',
- self._downloader.params.get('cn_verification_proxy'))
+ cn_verification_proxy = self._downloader.params.get('cn_verification_proxy')
+ if cn_verification_proxy:
+ play_json_req.add_header('Ytdl-request-proxy', cn_verification_proxy)
+
play_json = self._download_json(
play_json_req,
media_id, 'playJson data')
From 5ee6fc974e617ce2f8d9d62c416091a1daa6d802 Mon Sep 17 00:00:00 2001
From: Yen Chi Hsuan
Date: Fri, 6 Mar 2015 02:43:05 +0800
Subject: [PATCH 0002/1515] [sohu] Fix info extractor and add tests
---
youtube_dl/extractor/sohu.py | 46 +++++++++++++++++++++++++++++-------
1 file changed, 38 insertions(+), 8 deletions(-)
diff --git a/youtube_dl/extractor/sohu.py b/youtube_dl/extractor/sohu.py
index c04791997..ef7ec51df 100644
--- a/youtube_dl/extractor/sohu.py
+++ b/youtube_dl/extractor/sohu.py
@@ -4,22 +4,42 @@ from __future__ import unicode_literals
import re
from .common import InfoExtractor
-from .common import compat_str
+from ..utils import compat_str
+from ..compat import compat_urllib_request
class SohuIE(InfoExtractor):
_VALID_URL = r'https?://(?Pmy\.)?tv\.sohu\.com/.+?/(?(mytv)|n)(?P\d+)\.shtml.*?'
- _TEST = {
+ _TESTS = [{
+ 'note': 'This video is available only in Mainland China',
'url': 'http://tv.sohu.com/20130724/n382479172.shtml#super',
- 'md5': 'bde8d9a6ffd82c63a1eefaef4eeefec7',
+ 'md5': '29175c8cadd8b5cc4055001e85d6b372',
'info_dict': {
'id': '382479172',
'ext': 'mp4',
'title': 'MV:Far East Movement《The Illest》',
},
- 'skip': 'Only available from China',
- }
+ 'params': {
+ 'cn_verification_proxy': 'proxy.uku.im:8888'
+ }
+ }, {
+ 'url': 'http://tv.sohu.com/20150305/n409385080.shtml',
+ 'md5': '699060e75cf58858dd47fb9c03c42cfb',
+ 'info_dict': {
+ 'id': '409385080',
+ 'ext': 'mp4',
+ 'title': '《2015湖南卫视羊年元宵晚会》唐嫣《花好月圆》',
+ }
+ }, {
+ 'url': 'http://my.tv.sohu.com/us/232799889/78693464.shtml',
+ 'md5': '9bf34be48f2f4dadcb226c74127e203c',
+ 'info_dict': {
+ 'id': '78693464',
+ 'ext': 'mp4',
+ 'title': '【爱范品】第31期:MWC见不到的奇葩手机',
+ }
+ }]
def _real_extract(self, url):
@@ -29,9 +49,14 @@ class SohuIE(InfoExtractor):
else:
base_data_url = 'http://hot.vrs.sohu.com/vrs_flash.action?vid='
- return self._download_json(
- base_data_url + vid_id, video_id,
- 'Downloading JSON data for %s' % vid_id)
+ req = compat_urllib_request.Request(base_data_url + vid_id)
+
+ cn_verification_proxy = self._downloader.params.get('cn_verification_proxy')
+ if cn_verification_proxy:
+ req.add_header('Ytdl-request-proxy', cn_verification_proxy)
+
+ return self._download_json(req, video_id,
+ 'Downloading JSON data for %s' % vid_id)
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id')
@@ -77,6 +102,11 @@ class SohuIE(InfoExtractor):
% (format_id, i + 1, part_count))
part_info = part_str.split('|')
+
+ # Sanitize URL to prevent download failure
+ if part_info[0][-1] == '/' and su[i][0] == '/':
+ su[i] = su[i][1:]
+
video_url = '%s%s?key=%s' % (part_info[0], su[i], part_info[3])
formats.append({
From 5c7495a19429e3b27c003a4bd5bb96ed1e3a4932 Mon Sep 17 00:00:00 2001
From: Yen Chi Hsuan
Date: Fri, 6 Mar 2015 02:48:27 +0800
Subject: [PATCH 0003/1515] [sohu] Correct wrong imports
---
youtube_dl/extractor/sohu.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/youtube_dl/extractor/sohu.py b/youtube_dl/extractor/sohu.py
index ef7ec51df..335e84fab 100644
--- a/youtube_dl/extractor/sohu.py
+++ b/youtube_dl/extractor/sohu.py
@@ -4,8 +4,10 @@ from __future__ import unicode_literals
import re
from .common import InfoExtractor
-from ..utils import compat_str
-from ..compat import compat_urllib_request
+from ..compat import (
+ compat_str,
+ compat_urllib_request
+)
class SohuIE(InfoExtractor):
From 55969016e96fded28b97b2ef3bbf66efa83d6afb Mon Sep 17 00:00:00 2001
From: Yen Chi Hsuan
Date: Fri, 6 Mar 2015 12:43:49 +0800
Subject: [PATCH 0004/1515] [utils] Add a function to sanitize consecutive
slashes in URLs
---
test/test_utils.py | 16 ++++++++++++++++
youtube_dl/extractor/sohu.py | 8 +++-----
youtube_dl/utils.py | 15 +++++++++++++++
3 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/test/test_utils.py b/test/test_utils.py
index 64fad58ad..e02069c4d 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -54,6 +54,7 @@ from youtube_dl.utils import (
xpath_with_ns,
render_table,
match_str,
+ url_sanitize_consecutive_slashes,
)
@@ -501,6 +502,21 @@ ffmpeg version 2.4.4 Copyright (c) 2000-2014 the FFmpeg ...'''), '2.4.4')
'like_count > 100 & dislike_count 50 & description',
{'like_count': 190, 'dislike_count': 10}))
+ def test_url_sanitize_consecutive_slashes(self):
+ self.assertEqual(url_sanitize_consecutive_slashes(
+ 'http://hostname/foo//bar/filename.html'),
+ 'http://hostname/foo/bar/filename.html')
+ self.assertEqual(url_sanitize_consecutive_slashes(
+ 'http://hostname//foo/bar/filename.html'),
+ 'http://hostname/foo/bar/filename.html')
+ self.assertEqual(url_sanitize_consecutive_slashes(
+ 'http://hostname//'), 'http://hostname/')
+ self.assertEqual(url_sanitize_consecutive_slashes(
+ 'http://hostname/foo/bar/filename.html'),
+ 'http://hostname/foo/bar/filename.html')
+ self.assertEqual(url_sanitize_consecutive_slashes(
+ 'http://hostname/'), 'http://hostname/')
+
if __name__ == '__main__':
unittest.main()
diff --git a/youtube_dl/extractor/sohu.py b/youtube_dl/extractor/sohu.py
index 335e84fab..5adc734d9 100644
--- a/youtube_dl/extractor/sohu.py
+++ b/youtube_dl/extractor/sohu.py
@@ -8,6 +8,7 @@ from ..compat import (
compat_str,
compat_urllib_request
)
+from ..utils import url_sanitize_consecutive_slashes
class SohuIE(InfoExtractor):
@@ -105,11 +106,8 @@ class SohuIE(InfoExtractor):
part_info = part_str.split('|')
- # Sanitize URL to prevent download failure
- if part_info[0][-1] == '/' and su[i][0] == '/':
- su[i] = su[i][1:]
-
- video_url = '%s%s?key=%s' % (part_info[0], su[i], part_info[3])
+ video_url = url_sanitize_consecutive_slashes(
+ '%s%s?key=%s' % (part_info[0], su[i], part_info[3]))
formats.append({
'url': video_url,
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 7426e2a1f..ef14f9a36 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -1789,3 +1789,18 @@ class PerRequestProxyHandler(compat_urllib_request.ProxyHandler):
return None # No Proxy
return compat_urllib_request.ProxyHandler.proxy_open(
self, req, proxy, type)
+
+
+def url_sanitize_consecutive_slashes(url):
+ """Sanitize URLs with consecutive slashes
+
+ For example, transform both
+ http://hostname/foo//bar/filename.html
+ and
+ http://hostname//foo/bar/filename.html
+ into
+ http://hostname/foo/bar/filename.html
+ """
+ parsed_url = list(compat_urlparse.urlparse(url))
+ parsed_url[2] = re.sub(r'/{2,}', '/', parsed_url[2])
+ return compat_urlparse.urlunparse(parsed_url)
From a172d96292abda037b23b1f2b14dd2c6e65b56bb Mon Sep 17 00:00:00 2001
From: bonfy
Date: Sat, 7 Mar 2015 14:05:56 +0800
Subject: [PATCH 0005/1515] [douyutv] Add new extractor
---
youtube_dl/extractor/__init__.py | 1 +
youtube_dl/extractor/douyutv.py | 59 ++++++++++++++++++++++++++++++++
2 files changed, 60 insertions(+)
create mode 100644 youtube_dl/extractor/douyutv.py
diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py
index ffcc7d9ab..7d0798176 100644
--- a/youtube_dl/extractor/__init__.py
+++ b/youtube_dl/extractor/__init__.py
@@ -106,6 +106,7 @@ from .dctp import DctpTvIE
from .deezer import DeezerPlaylistIE
from .dfb import DFBIE
from .dotsub import DotsubIE
+from .douyutv import DouyutvIE
from .dreisat import DreiSatIE
from .drbonanza import DRBonanzaIE
from .drtuber import DrTuberIE
diff --git a/youtube_dl/extractor/douyutv.py b/youtube_dl/extractor/douyutv.py
new file mode 100644
index 000000000..e9b92eb3b
--- /dev/null
+++ b/youtube_dl/extractor/douyutv.py
@@ -0,0 +1,59 @@
+# coding: utf-8
+from __future__ import unicode_literals
+
+from .common import InfoExtractor
+
+from ..utils import (
+ ExtractorError,
+)
+
+class DouyutvIE(InfoExtractor):
+ _VALID_URL = r'http://(?:www\.)?douyutv\.com/(?P[A-Za-z0-9]+)'
+
+ '''
+ show_status: 1 直播中 ,2 没有直播
+ '''
+
+ _TEST = {
+ 'url': 'http://www.douyutv.com/iseven',
+ 'info_dict': {
+ 'id': 'iseven',
+ 'title': '清晨醒脑!T-ara根本停不下来!',
+ 'ext': 'flv',
+ 'thumbnail': 're:^https?://.*\.jpg$',
+ 'is_live': True,
+ }
+ }
+
+ def _real_extract(self, url):
+ video_id = self._match_id(url)
+ info_url = 'http://www.douyutv.com/api/client/room/' + video_id
+
+ config = self._download_json(info_url, video_id)
+
+ error_code = config.get('error')
+ show_status = config['data'].get('show_status')
+ if error_code is not 0:
+ raise ExtractorError('Server reported error %i' % error_code,
+ expected=True)
+
+ if show_status == '2':
+ raise ExtractorError('The live show has not yet started',
+ expected=True)
+
+ title = config['data'].get('room_name')
+ rtmp_url = config['data'].get('rtmp_url')
+ rtmp_live = config['data'].get('rtmp_live')
+ thumbnail = config['data'].get('room_src')
+
+ url = rtmp_url+'/'+rtmp_live
+
+ return {
+ 'id': video_id,
+ 'title': title,
+ 'ext':'flv',
+ 'url': url,
+ 'thumbnail': thumbnail,
+ 'is_live': True,
+ # TODO more properties (see youtube_dl/extractor/common.py)
+ }
\ No newline at end of file
From cd65491c306f644d7bb3c7ad98795a3f8660be49 Mon Sep 17 00:00:00 2001
From: Yen Chi Hsuan
Date: Sun, 15 Mar 2015 00:59:49 +0800
Subject: [PATCH 0006/1515] [Sohu] Add a multiplart video test case
---
youtube_dl/extractor/sohu.py | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/youtube_dl/extractor/sohu.py b/youtube_dl/extractor/sohu.py
index 5adc734d9..7db5b2f13 100644
--- a/youtube_dl/extractor/sohu.py
+++ b/youtube_dl/extractor/sohu.py
@@ -42,6 +42,37 @@ class SohuIE(InfoExtractor):
'ext': 'mp4',
'title': '【爱范品】第31期:MWC见不到的奇葩手机',
}
+ }, {
+ 'note': 'Multipart video',
+ 'url': 'http://my.tv.sohu.com/pl/8384802/78910339.shtml',
+ 'info_dict': {
+ 'id': '78910339',
+ },
+ 'playlist': [{
+ 'md5': 'bdbfb8f39924725e6589c146bc1883ad',
+ 'info_dict': {
+ 'id': '78910339_part1',
+ 'ext': 'mp4',
+ 'duration': 294,
+ 'title': '【神探苍实战秘籍】第13期 战争之影 赫卡里姆',
+ }
+ }, {
+ 'md5': '3e1f46aaeb95354fd10e7fca9fc1804e',
+ 'info_dict': {
+ 'id': '78910339_part2',
+ 'ext': 'mp4',
+ 'duration': 300,
+ 'title': '【神探苍实战秘籍】第13期 战争之影 赫卡里姆',
+ }
+ }, {
+ 'md5': '8407e634175fdac706766481b9443450',
+ 'info_dict': {
+ 'id': '78910339_part3',
+ 'ext': 'mp4',
+ 'duration': 150,
+ 'title': '【神探苍实战秘籍】第13期 战争之影 赫卡里姆',
+ }
+ }]
}]
def _real_extract(self, url):
From 2cb434e53ee861c8bcbd538455be107085f444ae Mon Sep 17 00:00:00 2001
From: Yen Chi Hsuan
Date: Sun, 15 Mar 2015 01:05:01 +0800
Subject: [PATCH 0007/1515] [Sohu] Fix title extraction
---
youtube_dl/extractor/sohu.py | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/youtube_dl/extractor/sohu.py b/youtube_dl/extractor/sohu.py
index 7db5b2f13..ea5cc06b9 100644
--- a/youtube_dl/extractor/sohu.py
+++ b/youtube_dl/extractor/sohu.py
@@ -73,6 +73,17 @@ class SohuIE(InfoExtractor):
'title': '【神探苍实战秘籍】第13期 战争之影 赫卡里姆',
}
}]
+ }, {
+ 'info': 'Video with title containing dash',
+ 'url': 'http://my.tv.sohu.com/us/249884221/78932792.shtml',
+ 'info_dict': {
+ 'id': '78932792',
+ 'ext': 'mp4',
+ 'title': 'youtube-dl testing video',
+ },
+ 'params': {
+ 'skip_download': True
+ }
}]
def _real_extract(self, url):
@@ -97,10 +108,8 @@ class SohuIE(InfoExtractor):
mytv = mobj.group('mytv') is not None
webpage = self._download_webpage(url, video_id)
- raw_title = self._html_search_regex(
- r'(?s)(.+?)',
- webpage, 'video title')
- title = raw_title.partition('-')[0].strip()
+
+ title = self._og_search_title(webpage)
vid = self._html_search_regex(
r'var vid ?= ?["\'](\d+)["\']',
From 2e90dff2c2ecade8afb444b086fbc0ad6d2c812d Mon Sep 17 00:00:00 2001
From: felix
Date: Mon, 16 Mar 2015 20:05:02 +0100
Subject: [PATCH 0008/1515] The Daily Show Podcast support
---
youtube_dl/extractor/__init__.py | 3 +-
youtube_dl/extractor/comedycentral.py | 21 ++++++++++++++
youtube_dl/extractor/libsyn.py | 41 +++++++++++++++++++++++++++
3 files changed, 64 insertions(+), 1 deletion(-)
create mode 100644 youtube_dl/extractor/libsyn.py
diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py
index 1bb3e1a1c..e94779d40 100644
--- a/youtube_dl/extractor/__init__.py
+++ b/youtube_dl/extractor/__init__.py
@@ -84,7 +84,7 @@ from .cnn import (
)
from .collegehumor import CollegeHumorIE
from .collegerama import CollegeRamaIE
-from .comedycentral import ComedyCentralIE, ComedyCentralShowsIE
+from .comedycentral import ComedyCentralIE, ComedyCentralShowsIE, TheDailyShowPodcastIE
from .comcarcoff import ComCarCoffIE
from .commonmistakes import CommonMistakesIE, UnicodeBOMIE
from .condenast import CondeNastIE
@@ -250,6 +250,7 @@ from .letv import (
LetvPlaylistIE
)
from .lifenews import LifeNewsIE
+from .libsyn import LibsynIE
from .liveleak import LiveLeakIE
from .livestream import (
LivestreamIE,
diff --git a/youtube_dl/extractor/comedycentral.py b/youtube_dl/extractor/comedycentral.py
index e5edcc84b..e427b9821 100644
--- a/youtube_dl/extractor/comedycentral.py
+++ b/youtube_dl/extractor/comedycentral.py
@@ -2,6 +2,7 @@ from __future__ import unicode_literals
import re
+from .common import InfoExtractor
from .mtv import MTVServicesInfoExtractor
from ..compat import (
compat_str,
@@ -272,3 +273,23 @@ class ComedyCentralShowsIE(MTVServicesInfoExtractor):
'title': show_name + ' ' + title,
'description': description,
}
+
+class TheDailyShowPodcastIE(InfoExtractor):
+ _VALID_URL = r'(?Phttps?:)?//thedailyshow\.cc\.com/podcast/(?P[a-z\-]+)'
+
+ def _real_extract(self, url):
+ display_id = self._match_id(url)
+ webpage = self._download_webpage(url, display_id)
+
+ player_url = self._search_regex(r'
', webpage,
+ 'description', fatal=False))
+
+ upload_date = unified_strdate(self._search_regex(
+ r'Ajouté le\s*([^<]+)', webpage,
+ 'upload date', fatal=False))
+
+ return {
+ 'id': video_id,
+ 'title': title,
+ 'description': description,
+ 'thumbnail': thumbnail,
+ 'upload_date': upload_date,
+ 'formats': formats,
+ }
From d1dc7e39918ddfc3402a8ffd669e6c84ac971803 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergey=20M=E2=80=A4?=
Date: Wed, 18 Mar 2015 23:11:48 +0600
Subject: [PATCH 0032/1515] [ultimedia] Fix alphabetic order
---
youtube_dl/extractor/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py
index 867e7c935..7eb9b4fbb 100644
--- a/youtube_dl/extractor/__init__.py
+++ b/youtube_dl/extractor/__init__.py
@@ -534,11 +534,11 @@ from .twitch import (
TwitchStreamIE,
)
from .ubu import UbuIE
-from .ultimedia import UltimediaIE
from .udemy import (
UdemyIE,
UdemyCourseIE
)
+from .ultimedia import UltimediaIE
from .unistra import UnistraIE
from .urort import UrortIE
from .ustream import UstreamIE, UstreamChannelIE
From 73900846b16d33f769d35ac945a97a66cc17fd5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergey=20M=E2=80=A4?=
Date: Thu, 19 Mar 2015 00:53:26 +0600
Subject: [PATCH 0033/1515] [ultimedia] Capture and output unavailable video
message
---
youtube_dl/extractor/ultimedia.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/youtube_dl/extractor/ultimedia.py b/youtube_dl/extractor/ultimedia.py
index 97e4445d4..0c1b08d7d 100644
--- a/youtube_dl/extractor/ultimedia.py
+++ b/youtube_dl/extractor/ultimedia.py
@@ -3,6 +3,7 @@ from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
+ ExtractorError,
qualities,
unified_strdate,
clean_html,
@@ -49,6 +50,10 @@ class UltimediaIE(InfoExtractor):
deliver_page = self._download_webpage(
deliver_url, video_id, 'Downloading iframe page')
+ if '>This video is currently not available' in deliver_page:
+ raise ExtractorError(
+ 'Video %s is currently not available' % video_id, expected=True)
+
player = self._parse_json(
self._search_regex(
r"jwplayer\('player(?:_temp)?'\)\.setup\(({.+?})\)\.on", deliver_page, 'player'),
From b30ef07c6ccb982cff623c34e7c5cec5d8eb9bb9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergey=20M=E2=80=A4?=
Date: Thu, 19 Mar 2015 01:06:39 +0600
Subject: [PATCH 0034/1515] [ultimedia] Handle youtube embeds
---
youtube_dl/extractor/ultimedia.py | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/youtube_dl/extractor/ultimedia.py b/youtube_dl/extractor/ultimedia.py
index 0c1b08d7d..06554a1be 100644
--- a/youtube_dl/extractor/ultimedia.py
+++ b/youtube_dl/extractor/ultimedia.py
@@ -1,6 +1,8 @@
# coding: utf-8
from __future__ import unicode_literals
+import re
+
from .common import InfoExtractor
from ..utils import (
ExtractorError,
@@ -60,12 +62,18 @@ class UltimediaIE(InfoExtractor):
video_id)
quality = qualities(['flash', 'html5'])
-
- formats = [{
- 'url': mode['config']['file'],
- 'format_id': mode.get('type'),
- 'quality': quality(mode.get('type')),
- } for mode in player['modes']]
+ formats = []
+ for mode in player['modes']:
+ video_url = mode.get('config', {}).get('file')
+ if not video_url:
+ continue
+ if re.match(r'https?://www\.youtube\.com/.+?', video_url):
+ return self.url_result(video_url, 'Youtube')
+ formats.append({
+ 'url': video_url,
+ 'format_id': mode.get('type'),
+ 'quality': quality(mode.get('type')),
+ })
self._sort_formats(formats)
thumbnail = player.get('image')
From cbc3cfcab41599f1b52e328878e19d15be1792d4 Mon Sep 17 00:00:00 2001
From: Philipp Hagemeister
Date: Wed, 18 Mar 2015 22:02:39 +0100
Subject: [PATCH 0035/1515] release 2015.03.18
---
docs/supportedsites.md | 4 ++++
youtube_dl/version.py | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/docs/supportedsites.md b/docs/supportedsites.md
index d6a1e67c6..72b365305 100644
--- a/docs/supportedsites.md
+++ b/docs/supportedsites.md
@@ -112,6 +112,7 @@
- **Discovery**
- **divxstage**: DivxStage
- **Dotsub**
+ - **DouyuTV**
- **DRBonanza**
- **Dropbox**
- **DrTuber**
@@ -342,6 +343,7 @@
- **PornHubPlaylist**
- **Pornotube**
- **PornoXO**
+ - **PrimeShareTV**
- **PromptFile**
- **prosiebensat1**: ProSiebenSat.1 Digital
- **Puls4**
@@ -367,6 +369,7 @@
- **RTP**
- **RTS**: RTS.ch
- **rtve.es:alacarta**: RTVE a la carta
+ - **rtve.es:infantil**: RTVE infantil
- **rtve.es:live**: RTVE.es live streams
- **RUHD**
- **rutube**: Rutube videos
@@ -487,6 +490,7 @@
- **Ubu**
- **udemy**
- **udemy:course**
+ - **Ultimedia**
- **Unistra**
- **Urort**: NRK P3 Urørt
- **ustream**
diff --git a/youtube_dl/version.py b/youtube_dl/version.py
index 7ed07c375..51b4260aa 100644
--- a/youtube_dl/version.py
+++ b/youtube_dl/version.py
@@ -1,3 +1,3 @@
from __future__ import unicode_literals
-__version__ = '2015.03.15'
+__version__ = '2015.03.18'
From 0ae8bbac2d12a883b8eb7a941c65c7b87987d213 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergey=20M=E2=80=A4?=
Date: Thu, 19 Mar 2015 21:17:04 +0600
Subject: [PATCH 0036/1515] [nytimes] Support embed URL
---
youtube_dl/extractor/nytimes.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/youtube_dl/extractor/nytimes.py b/youtube_dl/extractor/nytimes.py
index 56e1cad3b..5b57e95b6 100644
--- a/youtube_dl/extractor/nytimes.py
+++ b/youtube_dl/extractor/nytimes.py
@@ -7,7 +7,7 @@ from ..utils import parse_iso8601
class NYTimesIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?nytimes\.com/video/(?:[^/]+/)+(?P\d+)'
+ _VALID_URL = r'https?://(?:(?:www\.)?nytimes\.com/video/(?:[^/]+/)+|graphics8\.nytimes\.com/bcvideo/\d+(?:\.\d+)?/iframe/embed\.html\?videoId=)(?P\d+)'
_TEST = {
'url': 'http://www.nytimes.com/video/opinion/100000002847155/verbatim-what-is-a-photocopier.html?playlistId=100000001150263',
From f3c0c667a6d8d1b58ca198b72a353887ea8c4f38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergey=20M=E2=80=A4?=
Date: Thu, 19 Mar 2015 21:23:52 +0600
Subject: [PATCH 0037/1515] [nytimes] Modernize
---
youtube_dl/extractor/nytimes.py | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/youtube_dl/extractor/nytimes.py b/youtube_dl/extractor/nytimes.py
index 5b57e95b6..d1cf8f4f3 100644
--- a/youtube_dl/extractor/nytimes.py
+++ b/youtube_dl/extractor/nytimes.py
@@ -1,9 +1,11 @@
from __future__ import unicode_literals
-import re
-
from .common import InfoExtractor
-from ..utils import parse_iso8601
+from ..utils import (
+ float_or_none,
+ int_or_none,
+ parse_iso8601,
+)
class NYTimesIE(InfoExtractor):
@@ -25,15 +27,15 @@ class NYTimesIE(InfoExtractor):
}
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
+ video_id = self._match_id(url)
video_data = self._download_json(
- 'http://www.nytimes.com/svc/video/api/v2/video/%s' % video_id, video_id, 'Downloading video JSON')
+ 'http://www.nytimes.com/svc/video/api/v2/video/%s' % video_id,
+ video_id, 'Downloading video JSON')
title = video_data['headline']
- description = video_data['summary']
- duration = video_data['duration'] / 1000.0
+ description = video_data.get('summary')
+ duration = float_or_none(video_data.get('duration'), 1000)
uploader = video_data['byline']
timestamp = parse_iso8601(video_data['publication_date'][:-8])
@@ -49,11 +51,11 @@ class NYTimesIE(InfoExtractor):
formats = [
{
'url': video['url'],
- 'format_id': video['type'],
- 'vcodec': video['video_codec'],
- 'width': video['width'],
- 'height': video['height'],
- 'filesize': get_file_size(video['fileSize']),
+ 'format_id': video.get('type'),
+ 'vcodec': video.get('video_codec'),
+ 'width': int_or_none(video.get('width')),
+ 'height': int_or_none(video.get('height')),
+ 'filesize': get_file_size(video.get('fileSize')),
} for video in video_data['renditions']
]
self._sort_formats(formats)
@@ -61,7 +63,8 @@ class NYTimesIE(InfoExtractor):
thumbnails = [
{
'url': 'http://www.nytimes.com/%s' % image['url'],
- 'resolution': '%dx%d' % (image['width'], image['height']),
+ 'width': int_or_none(image.get('width')),
+ 'height': int_or_none(image.get('height')),
} for image in video_data['images']
]
From 3378d67a18d2d06574698168120bf8c7f7b9e172 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergey=20M=E2=80=A4?=
Date: Thu, 19 Mar 2015 21:26:57 +0600
Subject: [PATCH 0038/1515] [generic] Add support for nytimes embeds (Closes
#5234)
---
youtube_dl/extractor/generic.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index dc5755d12..8716e4503 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -1006,6 +1006,13 @@ class GenericIE(InfoExtractor):
if mobj is not None:
return self.url_result(mobj.group('url'))
+ # Look for NYTimes player
+ mobj = re.search(
+ r'