X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Ftvplay.py;h=e83e31a31640fa32e4a19a48a745d279a14d3753;hb=34e7dc81a94d39d48c5b4aac8cddcca46edba94d;hp=445e0ec419ccc7eb2e23e522f6f3eba6010dcd69;hpb=2eebf060af9fe284cbcb839886b27030553fb48d;p=youtube-dl diff --git a/youtube_dl/extractor/tvplay.py b/youtube_dl/extractor/tvplay.py index 445e0ec41..e83e31a31 100644 --- a/youtube_dl/extractor/tvplay.py +++ b/youtube_dl/extractor/tvplay.py @@ -4,9 +4,8 @@ from __future__ import unicode_literals import re from .common import InfoExtractor +from ..compat import compat_str from ..utils import ( - ExtractorError, - compat_str, parse_iso8601, qualities, ) @@ -17,6 +16,7 @@ class TVPlayIE(InfoExtractor): _VALID_URL = r'''(?x)http://(?:www\.)? (?:tvplay\.lv/parraides| tv3play\.lt/programos| + play\.tv3\.lt/programos| tv3play\.ee/sisu| tv3play\.se/program| tv6play\.se/program| @@ -46,7 +46,7 @@ class TVPlayIE(InfoExtractor): }, }, { - 'url': 'http://www.tv3play.lt/programos/moterys-meluoja-geriau/409229?autostart=true', + 'url': 'http://play.tv3.lt/programos/moterys-meluoja-geriau/409229?autostart=true', 'info_dict': { 'id': '409229', 'ext': 'flv', @@ -176,15 +176,14 @@ class TVPlayIE(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 = self._download_json( 'http://playapi.mtgx.tv/v1/videos/%s' % video_id, video_id, 'Downloading video JSON') if video['is_geo_blocked']: - raise ExtractorError( - 'This content is not available in your country due to copyright reasons', expected=True) + self.report_warning( + 'This content might not be available in your country due to copyright reasons') streams = self._download_json( 'http://playapi.mtgx.tv/v1/videos/stream/%s' % video_id, video_id, 'Downloading streams JSON') @@ -208,6 +207,10 @@ class TVPlayIE(InfoExtractor): 'app': m.group('app'), 'play_path': m.group('playpath'), }) + elif video_url.endswith('.f4m'): + formats.extend(self._extract_f4m_formats( + video_url + '?hdcore=3.5.0&plugin=aasp-3.5.0.151.81', video_id)) + continue else: fmt.update({ 'url': video_url,