Merge branch 'master' into GoogleDrive-issue-13619
This commit is contained in:
commit
0202d7e4cf
6
.github/ISSUE_TEMPLATE.md
vendored
6
.github/ISSUE_TEMPLATE.md
vendored
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.07.15*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
|
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.07.23*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
|
||||||
- [ ] I've **verified** and **I assure** that I'm running youtube-dl **2017.07.15**
|
- [ ] I've **verified** and **I assure** that I'm running youtube-dl **2017.07.23**
|
||||||
|
|
||||||
### Before submitting an *issue* make sure you have:
|
### Before submitting an *issue* make sure you have:
|
||||||
- [ ] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
|
- [ ] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
|
||||||
@ -35,7 +35,7 @@ $ youtube-dl -v <your command line>
|
|||||||
[debug] User config: []
|
[debug] User config: []
|
||||||
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
|
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
|
||||||
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
|
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
|
||||||
[debug] youtube-dl version 2017.07.15
|
[debug] youtube-dl version 2017.07.23
|
||||||
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
|
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
|
||||||
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
|
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
|
||||||
[debug] Proxy map: {}
|
[debug] Proxy map: {}
|
||||||
|
22
ChangeLog
22
ChangeLog
@ -1,8 +1,28 @@
|
|||||||
version <unreleased>
|
version 2017.07.23
|
||||||
|
|
||||||
|
Core
|
||||||
|
* [YoutubeDL] Improve default format specification (#13704)
|
||||||
|
* [YoutubeDL] Do not override id, extractor and extractor_key for
|
||||||
|
url_transparent entities
|
||||||
|
* [extractor/common] Fix playlist_from_matches
|
||||||
|
|
||||||
Extractors
|
Extractors
|
||||||
|
* [itv] Fix production id extraction (#13671, #13703)
|
||||||
|
* [vidio] Make duration non fatal and fix typo
|
||||||
|
* [mtv] Skip missing video parts (#13690)
|
||||||
|
* [sportbox:embed] Fix extraction
|
||||||
|
+ [npo] Add support for npo3.nl URLs (#13695)
|
||||||
|
* [dramafever] Remove video id from title (#13699)
|
||||||
|
+ [egghead:lesson] Add support for lessons (#6635)
|
||||||
|
* [funnyordie] Extract more metadata (#13677)
|
||||||
* [youku:show] Fix playlist extraction (#13248)
|
* [youku:show] Fix playlist extraction (#13248)
|
||||||
+ [dispeak] Recognize sevt subdomain (#13276)
|
+ [dispeak] Recognize sevt subdomain (#13276)
|
||||||
|
* [adn] Improve error reporting (#13663)
|
||||||
|
* [crunchyroll] Relax series and season regex (#13659)
|
||||||
|
+ [spiegel:article] Add support for nexx iframe embeds (#13029)
|
||||||
|
+ [nexx:embed] Add support for iframe embeds
|
||||||
|
* [nexx] Improve JS embed extraction
|
||||||
|
+ [pearvideo] Add support for pearvideo.com (#13031)
|
||||||
|
|
||||||
|
|
||||||
version 2017.07.15
|
version 2017.07.15
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
- **Allocine**
|
- **Allocine**
|
||||||
- **AlphaPorno**
|
- **AlphaPorno**
|
||||||
- **AMCNetworks**
|
- **AMCNetworks**
|
||||||
- **anderetijden**: npo.nl and ntr.nl
|
- **anderetijden**: npo.nl, ntr.nl, omroepwnl.nl, zapp.nl and npo3.nl
|
||||||
- **AnimeOnDemand**
|
- **AnimeOnDemand**
|
||||||
- **anitube.se**
|
- **anitube.se**
|
||||||
- **Anvato**
|
- **Anvato**
|
||||||
@ -238,6 +238,7 @@
|
|||||||
- **EbaumsWorld**
|
- **EbaumsWorld**
|
||||||
- **EchoMsk**
|
- **EchoMsk**
|
||||||
- **egghead:course**: egghead.io course
|
- **egghead:course**: egghead.io course
|
||||||
|
- **egghead:lesson**: egghead.io lesson
|
||||||
- **eHow**
|
- **eHow**
|
||||||
- **Einthusan**
|
- **Einthusan**
|
||||||
- **eitb.tv**
|
- **eitb.tv**
|
||||||
@ -522,6 +523,7 @@
|
|||||||
- **NextMediaActionNews**: 蘋果日報 - 動新聞
|
- **NextMediaActionNews**: 蘋果日報 - 動新聞
|
||||||
- **NextTV**: 壹電視
|
- **NextTV**: 壹電視
|
||||||
- **Nexx**
|
- **Nexx**
|
||||||
|
- **NexxEmbed**
|
||||||
- **nfb**: National Film Board of Canada
|
- **nfb**: National Film Board of Canada
|
||||||
- **nfl.com**
|
- **nfl.com**
|
||||||
- **NhkVod**
|
- **NhkVod**
|
||||||
@ -552,7 +554,7 @@
|
|||||||
- **NowTVList**
|
- **NowTVList**
|
||||||
- **nowvideo**: NowVideo
|
- **nowvideo**: NowVideo
|
||||||
- **Noz**
|
- **Noz**
|
||||||
- **npo**: npo.nl and ntr.nl
|
- **npo**: npo.nl, ntr.nl, omroepwnl.nl, zapp.nl and npo3.nl
|
||||||
- **npo.nl:live**
|
- **npo.nl:live**
|
||||||
- **npo.nl:radio**
|
- **npo.nl:radio**
|
||||||
- **npo.nl:radio:fragment**
|
- **npo.nl:radio:fragment**
|
||||||
@ -596,6 +598,7 @@
|
|||||||
- **Patreon**
|
- **Patreon**
|
||||||
- **pbs**: Public Broadcasting Service (PBS) and member stations: PBS: Public Broadcasting Service, APT - Alabama Public Television (WBIQ), GPB/Georgia Public Broadcasting (WGTV), Mississippi Public Broadcasting (WMPN), Nashville Public Television (WNPT), WFSU-TV (WFSU), WSRE (WSRE), WTCI (WTCI), WPBA/Channel 30 (WPBA), Alaska Public Media (KAKM), Arizona PBS (KAET), KNME-TV/Channel 5 (KNME), Vegas PBS (KLVX), AETN/ARKANSAS ETV NETWORK (KETS), KET (WKLE), WKNO/Channel 10 (WKNO), LPB/LOUISIANA PUBLIC BROADCASTING (WLPB), OETA (KETA), Ozarks Public Television (KOZK), WSIU Public Broadcasting (WSIU), KEET TV (KEET), KIXE/Channel 9 (KIXE), KPBS San Diego (KPBS), KQED (KQED), KVIE Public Television (KVIE), PBS SoCal/KOCE (KOCE), ValleyPBS (KVPT), CONNECTICUT PUBLIC TELEVISION (WEDH), KNPB Channel 5 (KNPB), SOPTV (KSYS), Rocky Mountain PBS (KRMA), KENW-TV3 (KENW), KUED Channel 7 (KUED), Wyoming PBS (KCWC), Colorado Public Television / KBDI 12 (KBDI), KBYU-TV (KBYU), Thirteen/WNET New York (WNET), WGBH/Channel 2 (WGBH), WGBY (WGBY), NJTV Public Media NJ (WNJT), WLIW21 (WLIW), mpt/Maryland Public Television (WMPB), WETA Television and Radio (WETA), WHYY (WHYY), PBS 39 (WLVT), WVPT - Your Source for PBS and More! (WVPT), Howard University Television (WHUT), WEDU PBS (WEDU), WGCU Public Media (WGCU), WPBT2 (WPBT), WUCF TV (WUCF), WUFT/Channel 5 (WUFT), WXEL/Channel 42 (WXEL), WLRN/Channel 17 (WLRN), WUSF Public Broadcasting (WUSF), ETV (WRLK), UNC-TV (WUNC), PBS Hawaii - Oceanic Cable Channel 10 (KHET), Idaho Public Television (KAID), KSPS (KSPS), OPB (KOPB), KWSU/Channel 10 & KTNW/Channel 31 (KWSU), WILL-TV (WILL), Network Knowledge - WSEC/Springfield (WSEC), WTTW11 (WTTW), Iowa Public Television/IPTV (KDIN), Nine Network (KETC), PBS39 Fort Wayne (WFWA), WFYI Indianapolis (WFYI), Milwaukee Public Television (WMVS), WNIN (WNIN), WNIT Public Television (WNIT), WPT (WPNE), WVUT/Channel 22 (WVUT), WEIU/Channel 51 (WEIU), WQPT-TV (WQPT), WYCC PBS Chicago (WYCC), WIPB-TV (WIPB), WTIU (WTIU), CET (WCET), ThinkTVNetwork (WPTD), WBGU-TV (WBGU), WGVU TV (WGVU), NET1 (KUON), Pioneer Public Television (KWCM), SDPB Television (KUSD), TPT (KTCA), KSMQ (KSMQ), KPTS/Channel 8 (KPTS), KTWU/Channel 11 (KTWU), East Tennessee PBS (WSJK), WCTE-TV (WCTE), WLJT, Channel 11 (WLJT), WOSU TV (WOSU), WOUB/WOUC (WOUB), WVPB (WVPB), WKYU-PBS (WKYU), KERA 13 (KERA), MPBN (WCBB), Mountain Lake PBS (WCFE), NHPTV (WENH), Vermont PBS (WETK), witf (WITF), WQED Multimedia (WQED), WMHT Educational Telecommunications (WMHT), Q-TV (WDCQ), WTVS Detroit Public TV (WTVS), CMU Public Television (WCMU), WKAR-TV (WKAR), WNMU-TV Public TV 13 (WNMU), WDSE - WRPT (WDSE), WGTE TV (WGTE), Lakeland Public Television (KAWE), KMOS-TV - Channels 6.1, 6.2 and 6.3 (KMOS), MontanaPBS (KUSM), KRWG/Channel 22 (KRWG), KACV (KACV), KCOS/Channel 13 (KCOS), WCNY/Channel 24 (WCNY), WNED (WNED), WPBS (WPBS), WSKG Public TV (WSKG), WXXI (WXXI), WPSU (WPSU), WVIA Public Media Studios (WVIA), WTVI (WTVI), Western Reserve PBS (WNEO), WVIZ/PBS ideastream (WVIZ), KCTS 9 (KCTS), Basin PBS (KPBT), KUHT / Channel 8 (KUHT), KLRN (KLRN), KLRU (KLRU), WTJX Channel 12 (WTJX), WCVE PBS (WCVE), KBTC Public Television (KBTC)
|
- **pbs**: Public Broadcasting Service (PBS) and member stations: PBS: Public Broadcasting Service, APT - Alabama Public Television (WBIQ), GPB/Georgia Public Broadcasting (WGTV), Mississippi Public Broadcasting (WMPN), Nashville Public Television (WNPT), WFSU-TV (WFSU), WSRE (WSRE), WTCI (WTCI), WPBA/Channel 30 (WPBA), Alaska Public Media (KAKM), Arizona PBS (KAET), KNME-TV/Channel 5 (KNME), Vegas PBS (KLVX), AETN/ARKANSAS ETV NETWORK (KETS), KET (WKLE), WKNO/Channel 10 (WKNO), LPB/LOUISIANA PUBLIC BROADCASTING (WLPB), OETA (KETA), Ozarks Public Television (KOZK), WSIU Public Broadcasting (WSIU), KEET TV (KEET), KIXE/Channel 9 (KIXE), KPBS San Diego (KPBS), KQED (KQED), KVIE Public Television (KVIE), PBS SoCal/KOCE (KOCE), ValleyPBS (KVPT), CONNECTICUT PUBLIC TELEVISION (WEDH), KNPB Channel 5 (KNPB), SOPTV (KSYS), Rocky Mountain PBS (KRMA), KENW-TV3 (KENW), KUED Channel 7 (KUED), Wyoming PBS (KCWC), Colorado Public Television / KBDI 12 (KBDI), KBYU-TV (KBYU), Thirteen/WNET New York (WNET), WGBH/Channel 2 (WGBH), WGBY (WGBY), NJTV Public Media NJ (WNJT), WLIW21 (WLIW), mpt/Maryland Public Television (WMPB), WETA Television and Radio (WETA), WHYY (WHYY), PBS 39 (WLVT), WVPT - Your Source for PBS and More! (WVPT), Howard University Television (WHUT), WEDU PBS (WEDU), WGCU Public Media (WGCU), WPBT2 (WPBT), WUCF TV (WUCF), WUFT/Channel 5 (WUFT), WXEL/Channel 42 (WXEL), WLRN/Channel 17 (WLRN), WUSF Public Broadcasting (WUSF), ETV (WRLK), UNC-TV (WUNC), PBS Hawaii - Oceanic Cable Channel 10 (KHET), Idaho Public Television (KAID), KSPS (KSPS), OPB (KOPB), KWSU/Channel 10 & KTNW/Channel 31 (KWSU), WILL-TV (WILL), Network Knowledge - WSEC/Springfield (WSEC), WTTW11 (WTTW), Iowa Public Television/IPTV (KDIN), Nine Network (KETC), PBS39 Fort Wayne (WFWA), WFYI Indianapolis (WFYI), Milwaukee Public Television (WMVS), WNIN (WNIN), WNIT Public Television (WNIT), WPT (WPNE), WVUT/Channel 22 (WVUT), WEIU/Channel 51 (WEIU), WQPT-TV (WQPT), WYCC PBS Chicago (WYCC), WIPB-TV (WIPB), WTIU (WTIU), CET (WCET), ThinkTVNetwork (WPTD), WBGU-TV (WBGU), WGVU TV (WGVU), NET1 (KUON), Pioneer Public Television (KWCM), SDPB Television (KUSD), TPT (KTCA), KSMQ (KSMQ), KPTS/Channel 8 (KPTS), KTWU/Channel 11 (KTWU), East Tennessee PBS (WSJK), WCTE-TV (WCTE), WLJT, Channel 11 (WLJT), WOSU TV (WOSU), WOUB/WOUC (WOUB), WVPB (WVPB), WKYU-PBS (WKYU), KERA 13 (KERA), MPBN (WCBB), Mountain Lake PBS (WCFE), NHPTV (WENH), Vermont PBS (WETK), witf (WITF), WQED Multimedia (WQED), WMHT Educational Telecommunications (WMHT), Q-TV (WDCQ), WTVS Detroit Public TV (WTVS), CMU Public Television (WCMU), WKAR-TV (WKAR), WNMU-TV Public TV 13 (WNMU), WDSE - WRPT (WDSE), WGTE TV (WGTE), Lakeland Public Television (KAWE), KMOS-TV - Channels 6.1, 6.2 and 6.3 (KMOS), MontanaPBS (KUSM), KRWG/Channel 22 (KRWG), KACV (KACV), KCOS/Channel 13 (KCOS), WCNY/Channel 24 (WCNY), WNED (WNED), WPBS (WPBS), WSKG Public TV (WSKG), WXXI (WXXI), WPSU (WPSU), WVIA Public Media Studios (WVIA), WTVI (WTVI), Western Reserve PBS (WNEO), WVIZ/PBS ideastream (WVIZ), KCTS 9 (KCTS), Basin PBS (KPBT), KUHT / Channel 8 (KUHT), KLRN (KLRN), KLRU (KLRU), WTJX Channel 12 (WTJX), WCVE PBS (WCVE), KBTC Public Television (KBTC)
|
||||||
- **pcmag**
|
- **pcmag**
|
||||||
|
- **PearVideo**
|
||||||
- **People**
|
- **People**
|
||||||
- **periscope**: Periscope
|
- **periscope**: Periscope
|
||||||
- **periscope:user**: Periscope user videos
|
- **periscope:user**: Periscope user videos
|
||||||
@ -772,7 +775,7 @@
|
|||||||
- **tagesschau:player**
|
- **tagesschau:player**
|
||||||
- **Tass**
|
- **Tass**
|
||||||
- **TastyTrade**
|
- **TastyTrade**
|
||||||
- **TBS**
|
- **TBS** (Currently broken)
|
||||||
- **TDSLifeway**
|
- **TDSLifeway**
|
||||||
- **teachertube**: teachertube.com videos
|
- **teachertube**: teachertube.com videos
|
||||||
- **teachertube:user:collection**: teachertube.com user and collection videos
|
- **teachertube:user:collection**: teachertube.com user and collection videos
|
||||||
@ -950,7 +953,7 @@
|
|||||||
- **VoiceRepublic**
|
- **VoiceRepublic**
|
||||||
- **VoxMedia**
|
- **VoxMedia**
|
||||||
- **Vporn**
|
- **Vporn**
|
||||||
- **vpro**: npo.nl and ntr.nl
|
- **vpro**: npo.nl, ntr.nl, omroepwnl.nl, zapp.nl and npo3.nl
|
||||||
- **Vrak**
|
- **Vrak**
|
||||||
- **VRT**: deredactie.be, sporza.be, cobra.be and cobra.canvas.be
|
- **VRT**: deredactie.be, sporza.be, cobra.be and cobra.canvas.be
|
||||||
- **vrv**
|
- **vrv**
|
||||||
@ -976,7 +979,7 @@
|
|||||||
- **wholecloud**: WholeCloud
|
- **wholecloud**: WholeCloud
|
||||||
- **Wimp**
|
- **Wimp**
|
||||||
- **Wistia**
|
- **Wistia**
|
||||||
- **wnl**: npo.nl and ntr.nl
|
- **wnl**: npo.nl, ntr.nl, omroepwnl.nl, zapp.nl and npo3.nl
|
||||||
- **WorldStarHipHop**
|
- **WorldStarHipHop**
|
||||||
- **wrzuta.pl**
|
- **wrzuta.pl**
|
||||||
- **wrzuta.pl:playlist**
|
- **wrzuta.pl:playlist**
|
||||||
|
@ -449,6 +449,17 @@ class TestFormatSelection(unittest.TestCase):
|
|||||||
pass
|
pass
|
||||||
self.assertEqual(ydl.downloaded_info_dicts, [])
|
self.assertEqual(ydl.downloaded_info_dicts, [])
|
||||||
|
|
||||||
|
def test_default_format_spec(self):
|
||||||
|
ydl = YDL({'simulate': True})
|
||||||
|
self.assertEqual(ydl._default_format_spec({}), 'bestvideo+bestaudio/best')
|
||||||
|
|
||||||
|
ydl = YDL({'outtmpl': '-'})
|
||||||
|
self.assertEqual(ydl._default_format_spec({}), 'best')
|
||||||
|
|
||||||
|
ydl = YDL({})
|
||||||
|
self.assertEqual(ydl._default_format_spec({}, download=False), 'bestvideo+bestaudio/best')
|
||||||
|
self.assertEqual(ydl._default_format_spec({'is_live': True}), 'best')
|
||||||
|
|
||||||
|
|
||||||
class TestYoutubeDL(unittest.TestCase):
|
class TestYoutubeDL(unittest.TestCase):
|
||||||
def test_subtitles(self):
|
def test_subtitles(self):
|
||||||
|
@ -1064,6 +1064,25 @@ class YoutubeDL(object):
|
|||||||
return op(actual_value, comparison_value)
|
return op(actual_value, comparison_value)
|
||||||
return _filter
|
return _filter
|
||||||
|
|
||||||
|
def _default_format_spec(self, info_dict, download=True):
|
||||||
|
req_format_list = []
|
||||||
|
|
||||||
|
def can_have_partial_formats():
|
||||||
|
if self.params.get('simulate', False):
|
||||||
|
return True
|
||||||
|
if not download:
|
||||||
|
return True
|
||||||
|
if self.params.get('outtmpl', DEFAULT_OUTTMPL) == '-':
|
||||||
|
return False
|
||||||
|
if info_dict.get('is_live'):
|
||||||
|
return False
|
||||||
|
merger = FFmpegMergerPP(self)
|
||||||
|
return merger.available and merger.can_merge()
|
||||||
|
if can_have_partial_formats():
|
||||||
|
req_format_list.append('bestvideo+bestaudio')
|
||||||
|
req_format_list.append('best')
|
||||||
|
return '/'.join(req_format_list)
|
||||||
|
|
||||||
def build_format_selector(self, format_spec):
|
def build_format_selector(self, format_spec):
|
||||||
def syntax_error(note, start):
|
def syntax_error(note, start):
|
||||||
message = (
|
message = (
|
||||||
@ -1534,14 +1553,10 @@ class YoutubeDL(object):
|
|||||||
|
|
||||||
req_format = self.params.get('format')
|
req_format = self.params.get('format')
|
||||||
if req_format is None:
|
if req_format is None:
|
||||||
req_format_list = []
|
req_format = self._default_format_spec(info_dict, download=download)
|
||||||
if (self.params.get('outtmpl', DEFAULT_OUTTMPL) != '-' and
|
if self.params.get('verbose'):
|
||||||
not info_dict.get('is_live')):
|
self.to_stdout('[debug] Default format spec: %s' % req_format)
|
||||||
merger = FFmpegMergerPP(self)
|
|
||||||
if merger.available and merger.can_merge():
|
|
||||||
req_format_list.append('bestvideo+bestaudio')
|
|
||||||
req_format_list.append('best')
|
|
||||||
req_format = '/'.join(req_format_list)
|
|
||||||
format_selector = self.build_format_selector(req_format)
|
format_selector = self.build_format_selector(req_format)
|
||||||
|
|
||||||
# While in format selection we may need to have an access to the original
|
# While in format selection we may need to have an access to the original
|
||||||
|
@ -12,6 +12,7 @@ from ..utils import (
|
|||||||
ExtractorError,
|
ExtractorError,
|
||||||
clean_html,
|
clean_html,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
|
remove_end,
|
||||||
sanitized_Request,
|
sanitized_Request,
|
||||||
urlencode_postdata
|
urlencode_postdata
|
||||||
)
|
)
|
||||||
@ -72,15 +73,15 @@ class DramaFeverIE(DramaFeverBaseIE):
|
|||||||
'url': 'http://www.dramafever.com/drama/4512/1/Cooking_with_Shin/',
|
'url': 'http://www.dramafever.com/drama/4512/1/Cooking_with_Shin/',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '4512.1',
|
'id': '4512.1',
|
||||||
'ext': 'mp4',
|
'ext': 'flv',
|
||||||
'title': 'Cooking with Shin 4512.1',
|
'title': 'Cooking with Shin',
|
||||||
'description': 'md5:a8eec7942e1664a6896fcd5e1287bfd0',
|
'description': 'md5:a8eec7942e1664a6896fcd5e1287bfd0',
|
||||||
'episode': 'Episode 1',
|
'episode': 'Episode 1',
|
||||||
'episode_number': 1,
|
'episode_number': 1,
|
||||||
'thumbnail': r're:^https?://.*\.jpg',
|
'thumbnail': r're:^https?://.*\.jpg',
|
||||||
'timestamp': 1404336058,
|
'timestamp': 1404336058,
|
||||||
'upload_date': '20140702',
|
'upload_date': '20140702',
|
||||||
'duration': 343,
|
'duration': 344,
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
# m3u8 download
|
# m3u8 download
|
||||||
@ -90,15 +91,15 @@ class DramaFeverIE(DramaFeverBaseIE):
|
|||||||
'url': 'http://www.dramafever.com/drama/4826/4/Mnet_Asian_Music_Awards_2015/?ap=1',
|
'url': 'http://www.dramafever.com/drama/4826/4/Mnet_Asian_Music_Awards_2015/?ap=1',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '4826.4',
|
'id': '4826.4',
|
||||||
'ext': 'mp4',
|
'ext': 'flv',
|
||||||
'title': 'Mnet Asian Music Awards 2015 4826.4',
|
'title': 'Mnet Asian Music Awards 2015',
|
||||||
'description': 'md5:3ff2ee8fedaef86e076791c909cf2e91',
|
'description': 'md5:3ff2ee8fedaef86e076791c909cf2e91',
|
||||||
'episode': 'Mnet Asian Music Awards 2015 - Part 3',
|
'episode': 'Mnet Asian Music Awards 2015 - Part 3',
|
||||||
'episode_number': 4,
|
'episode_number': 4,
|
||||||
'thumbnail': r're:^https?://.*\.jpg',
|
'thumbnail': r're:^https?://.*\.jpg',
|
||||||
'timestamp': 1450213200,
|
'timestamp': 1450213200,
|
||||||
'upload_date': '20151215',
|
'upload_date': '20151215',
|
||||||
'duration': 5602,
|
'duration': 5359,
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
# m3u8 download
|
# m3u8 download
|
||||||
@ -122,6 +123,10 @@ class DramaFeverIE(DramaFeverBaseIE):
|
|||||||
countries=self._GEO_COUNTRIES)
|
countries=self._GEO_COUNTRIES)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
# title is postfixed with video id for some reason, removing
|
||||||
|
if info.get('title'):
|
||||||
|
info['title'] = remove_end(info['title'], video_id).strip()
|
||||||
|
|
||||||
series_id, episode_number = video_id.split('.')
|
series_id, episode_number = video_id.split('.')
|
||||||
episode_info = self._download_json(
|
episode_info = self._download_json(
|
||||||
# We only need a single episode info, so restricting page size to one episode
|
# We only need a single episode info, so restricting page size to one episode
|
||||||
|
@ -59,12 +59,18 @@ class ITVIE(InfoExtractor):
|
|||||||
def _add_sub_element(element, name):
|
def _add_sub_element(element, name):
|
||||||
return etree.SubElement(element, _add_ns(name))
|
return etree.SubElement(element, _add_ns(name))
|
||||||
|
|
||||||
|
production_id = (
|
||||||
|
params.get('data-video-autoplay-id') or
|
||||||
|
'%s#001' % (
|
||||||
|
params.get('data-video-episode-id') or
|
||||||
|
video_id.replace('a', '/')))
|
||||||
|
|
||||||
req_env = etree.Element(_add_ns('soapenv:Envelope'))
|
req_env = etree.Element(_add_ns('soapenv:Envelope'))
|
||||||
_add_sub_element(req_env, 'soapenv:Header')
|
_add_sub_element(req_env, 'soapenv:Header')
|
||||||
body = _add_sub_element(req_env, 'soapenv:Body')
|
body = _add_sub_element(req_env, 'soapenv:Body')
|
||||||
get_playlist = _add_sub_element(body, ('tem:GetPlaylist'))
|
get_playlist = _add_sub_element(body, ('tem:GetPlaylist'))
|
||||||
request = _add_sub_element(get_playlist, 'tem:request')
|
request = _add_sub_element(get_playlist, 'tem:request')
|
||||||
_add_sub_element(request, 'itv:ProductionId').text = params['data-video-id']
|
_add_sub_element(request, 'itv:ProductionId').text = production_id
|
||||||
_add_sub_element(request, 'itv:RequestGuid').text = compat_str(uuid.uuid4()).upper()
|
_add_sub_element(request, 'itv:RequestGuid').text = compat_str(uuid.uuid4()).upper()
|
||||||
vodcrid = _add_sub_element(request, 'itv:Vodcrid')
|
vodcrid = _add_sub_element(request, 'itv:Vodcrid')
|
||||||
_add_sub_element(vodcrid, 'com:Id')
|
_add_sub_element(vodcrid, 'com:Id')
|
||||||
|
@ -83,7 +83,7 @@ class MTVServicesInfoExtractor(InfoExtractor):
|
|||||||
hls_url = rendition.find('./src').text
|
hls_url = rendition.find('./src').text
|
||||||
formats.extend(self._extract_m3u8_formats(
|
formats.extend(self._extract_m3u8_formats(
|
||||||
hls_url, video_id, ext='mp4', entry_protocol='m3u8_native',
|
hls_url, video_id, ext='mp4', entry_protocol='m3u8_native',
|
||||||
m3u8_id='hls'))
|
m3u8_id='hls', fatal=False))
|
||||||
else:
|
else:
|
||||||
# fms
|
# fms
|
||||||
try:
|
try:
|
||||||
@ -106,7 +106,8 @@ class MTVServicesInfoExtractor(InfoExtractor):
|
|||||||
}])
|
}])
|
||||||
except (KeyError, TypeError):
|
except (KeyError, TypeError):
|
||||||
raise ExtractorError('Invalid rendition field.')
|
raise ExtractorError('Invalid rendition field.')
|
||||||
self._sort_formats(formats)
|
if formats:
|
||||||
|
self._sort_formats(formats)
|
||||||
return formats
|
return formats
|
||||||
|
|
||||||
def _extract_subtitles(self, mdoc, mtvn_id):
|
def _extract_subtitles(self, mdoc, mtvn_id):
|
||||||
@ -133,8 +134,11 @@ class MTVServicesInfoExtractor(InfoExtractor):
|
|||||||
mediagen_url += 'acceptMethods='
|
mediagen_url += 'acceptMethods='
|
||||||
mediagen_url += 'hls' if use_hls else 'fms'
|
mediagen_url += 'hls' if use_hls else 'fms'
|
||||||
|
|
||||||
mediagen_doc = self._download_xml(mediagen_url, video_id,
|
mediagen_doc = self._download_xml(
|
||||||
'Downloading video urls')
|
mediagen_url, video_id, 'Downloading video urls', fatal=False)
|
||||||
|
|
||||||
|
if mediagen_doc is False:
|
||||||
|
return None
|
||||||
|
|
||||||
item = mediagen_doc.find('./video/item')
|
item = mediagen_doc.find('./video/item')
|
||||||
if item is not None and item.get('type') == 'text':
|
if item is not None and item.get('type') == 'text':
|
||||||
@ -174,6 +178,13 @@ class MTVServicesInfoExtractor(InfoExtractor):
|
|||||||
|
|
||||||
formats = self._extract_video_formats(mediagen_doc, mtvn_id, video_id)
|
formats = self._extract_video_formats(mediagen_doc, mtvn_id, video_id)
|
||||||
|
|
||||||
|
# Some parts of complete video may be missing (e.g. missing Act 3 in
|
||||||
|
# http://www.southpark.de/alle-episoden/s14e01-sexual-healing)
|
||||||
|
if not formats:
|
||||||
|
return None
|
||||||
|
|
||||||
|
self._sort_formats(formats)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'title': title,
|
'title': title,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
@ -205,9 +216,14 @@ class MTVServicesInfoExtractor(InfoExtractor):
|
|||||||
title = xpath_text(idoc, './channel/title')
|
title = xpath_text(idoc, './channel/title')
|
||||||
description = xpath_text(idoc, './channel/description')
|
description = xpath_text(idoc, './channel/description')
|
||||||
|
|
||||||
|
entries = []
|
||||||
|
for item in idoc.findall('.//item'):
|
||||||
|
info = self._get_video_info(item, use_hls)
|
||||||
|
if info:
|
||||||
|
entries.append(info)
|
||||||
|
|
||||||
return self.playlist_result(
|
return self.playlist_result(
|
||||||
[self._get_video_info(item, use_hls) for item in idoc.findall('.//item')],
|
entries, playlist_title=title, playlist_description=description)
|
||||||
playlist_title=title, playlist_description=description)
|
|
||||||
|
|
||||||
def _extract_triforce_mgid(self, webpage, data_zone=None, video_id=None):
|
def _extract_triforce_mgid(self, webpage, data_zone=None, video_id=None):
|
||||||
triforce_feed = self._parse_json(self._search_regex(
|
triforce_feed = self._parse_json(self._search_regex(
|
||||||
|
@ -28,7 +28,7 @@ class NPOBaseIE(InfoExtractor):
|
|||||||
|
|
||||||
class NPOIE(NPOBaseIE):
|
class NPOIE(NPOBaseIE):
|
||||||
IE_NAME = 'npo'
|
IE_NAME = 'npo'
|
||||||
IE_DESC = 'npo.nl and ntr.nl'
|
IE_DESC = 'npo.nl, ntr.nl, omroepwnl.nl, zapp.nl and npo3.nl'
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
(?:
|
(?:
|
||||||
npo:|
|
npo:|
|
||||||
@ -38,7 +38,7 @@ class NPOIE(NPOBaseIE):
|
|||||||
npo\.nl/(?!(?:live|radio)/)(?:[^/]+/){2}|
|
npo\.nl/(?!(?:live|radio)/)(?:[^/]+/){2}|
|
||||||
ntr\.nl/(?:[^/]+/){2,}|
|
ntr\.nl/(?:[^/]+/){2,}|
|
||||||
omroepwnl\.nl/video/fragment/[^/]+__|
|
omroepwnl\.nl/video/fragment/[^/]+__|
|
||||||
zapp\.nl/[^/]+/[^/]+/
|
(?:zapp|npo3)\.nl/(?:[^/]+/){2}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(?P<id>[^/?#]+)
|
(?P<id>[^/?#]+)
|
||||||
@ -146,6 +146,9 @@ class NPOIE(NPOBaseIE):
|
|||||||
}, {
|
}, {
|
||||||
'url': 'http://www.zapp.nl/beste-vrienden-quiz/extra-video-s/WO_NTR_1067990',
|
'url': 'http://www.zapp.nl/beste-vrienden-quiz/extra-video-s/WO_NTR_1067990',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
'url': 'https://www.npo3.nl/3onderzoekt/16-09-2015/VPWON_1239870',
|
||||||
|
'only_matching': True,
|
||||||
}, {
|
}, {
|
||||||
# live stream
|
# live stream
|
||||||
'url': 'npo:LI_NL1_4188102',
|
'url': 'npo:LI_NL1_4188102',
|
||||||
|
@ -4,7 +4,11 @@ from __future__ import unicode_literals
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import js_to_json
|
from ..utils import (
|
||||||
|
determine_ext,
|
||||||
|
int_or_none,
|
||||||
|
js_to_json,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class SportBoxEmbedIE(InfoExtractor):
|
class SportBoxEmbedIE(InfoExtractor):
|
||||||
@ -14,8 +18,10 @@ class SportBoxEmbedIE(InfoExtractor):
|
|||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '211355',
|
'id': '211355',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'В Новороссийске прошел детский турнир «Поле славы боевой»',
|
'title': '211355',
|
||||||
'thumbnail': r're:^https?://.*\.jpg$',
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||||||
|
'duration': 292,
|
||||||
|
'view_count': int,
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
# m3u8 download
|
# m3u8 download
|
||||||
@ -24,6 +30,9 @@ class SportBoxEmbedIE(InfoExtractor):
|
|||||||
}, {
|
}, {
|
||||||
'url': 'http://news.sportbox.ru/vdl/player?nid=370908&only_player=1&autostart=false&playeri=2&height=340&width=580',
|
'url': 'http://news.sportbox.ru/vdl/player?nid=370908&only_player=1&autostart=false&playeri=2&height=340&width=580',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
'url': 'https://news.sportbox.ru/vdl/player/media/193095',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@ -37,36 +46,34 @@ class SportBoxEmbedIE(InfoExtractor):
|
|||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
|
wjplayer_data = self._parse_json(
|
||||||
|
self._search_regex(
|
||||||
|
r'(?s)wjplayer\(({.+?})\);', webpage, 'wjplayer settings'),
|
||||||
|
video_id, transform_source=js_to_json)
|
||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
|
for source in wjplayer_data['sources']:
|
||||||
def cleanup_js(code):
|
src = source.get('src')
|
||||||
# desktop_advert_config contains complex Javascripts and we don't need it
|
if not src:
|
||||||
return js_to_json(re.sub(r'desktop_advert_config.*', '', code))
|
continue
|
||||||
|
if determine_ext(src) == 'm3u8':
|
||||||
jwplayer_data = self._parse_json(self._search_regex(
|
formats.extend(self._extract_m3u8_formats(
|
||||||
r'(?s)player\.setup\(({.+?})\);', webpage, 'jwplayer settings'), video_id,
|
src, video_id, 'mp4', entry_protocol='m3u8_native',
|
||||||
transform_source=cleanup_js)
|
m3u8_id='hls', fatal=False))
|
||||||
|
else:
|
||||||
hls_url = jwplayer_data.get('hls_url')
|
formats.append({
|
||||||
if hls_url:
|
'url': src,
|
||||||
formats.extend(self._extract_m3u8_formats(
|
})
|
||||||
hls_url, video_id, ext='mp4', m3u8_id='hls'))
|
|
||||||
|
|
||||||
rtsp_url = jwplayer_data.get('rtsp_url')
|
|
||||||
if rtsp_url:
|
|
||||||
formats.append({
|
|
||||||
'url': rtsp_url,
|
|
||||||
'format_id': 'rtsp',
|
|
||||||
})
|
|
||||||
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
title = jwplayer_data['node_title']
|
view_count = int_or_none(self._search_regex(
|
||||||
thumbnail = jwplayer_data.get('image_url')
|
r'Просмотров\s*:\s*(\d+)', webpage, 'view count', default=None))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': video_id,
|
||||||
'thumbnail': thumbnail,
|
'thumbnail': wjplayer_data.get('poster'),
|
||||||
|
'duration': int_or_none(wjplayer_data.get('duration')),
|
||||||
|
'view_count': view_count,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,11 @@ class VH1IE(MTVIE):
|
|||||||
idoc = self._download_xml(
|
idoc = self._download_xml(
|
||||||
doc_url, video_id,
|
doc_url, video_id,
|
||||||
'Downloading info', transform_source=fix_xml_ampersands)
|
'Downloading info', transform_source=fix_xml_ampersands)
|
||||||
return self.playlist_result(
|
|
||||||
[self._get_video_info(item) for item in idoc.findall('.//item')],
|
entries = []
|
||||||
playlist_id=video_id,
|
for item in idoc.findall('.//item'):
|
||||||
)
|
info = self._get_video_info(item)
|
||||||
|
if info:
|
||||||
|
entries.append(info)
|
||||||
|
|
||||||
|
return self.playlist_result(entries, playlist_id=video_id)
|
||||||
|
@ -56,7 +56,8 @@ class VidioIE(InfoExtractor):
|
|||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
duration = int_or_none(duration or self._search_regex(
|
duration = int_or_none(duration or self._search_regex(
|
||||||
r'data-video-duration=(["\'])(?P<duartion>\d+)\1', webpage, 'duration'))
|
r'data-video-duration=(["\'])(?P<duration>\d+)\1', webpage,
|
||||||
|
'duration', fatal=False, group='duration'))
|
||||||
thumbnail = thumbnail or self._og_search_thumbnail(webpage)
|
thumbnail = thumbnail or self._og_search_thumbnail(webpage)
|
||||||
|
|
||||||
like_count = int_or_none(self._search_regex(
|
like_count = int_or_none(self._search_regex(
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
__version__ = '2017.07.15'
|
__version__ = '2017.07.23'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user