X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fletv.py;h=a28abb0f0081d05c5c2d0c07080ba33db0badaed;hb=3368d70dceba93aa9acdb97ec2705471a3424c57;hp=9ed81a1992acc8e527844e0242e6392abe37884f;hpb=63fc80005782430180ed0d13ac6ab5ca497d333a;p=youtube-dl.git diff --git a/youtube_dl/extractor/letv.py b/youtube_dl/extractor/letv.py index 9ed81a199..a28abb0f0 100644 --- a/youtube_dl/extractor/letv.py +++ b/youtube_dl/extractor/letv.py @@ -15,10 +15,12 @@ from ..utils import ( determine_ext, ExtractorError, parse_iso8601, + int_or_none, ) class LetvIE(InfoExtractor): + IE_DESC = '乐视网' _VALID_URL = r'http://www\.letv\.com/ptv/vplay/(?P\d+).html' _TESTS = [{ @@ -50,9 +52,7 @@ class LetvIE(InfoExtractor): 'title': '与龙共舞 完整版', 'description': 'md5:7506a5eeb1722bb9d4068f85024e3986', }, - 'params': { - 'cn_verification_proxy': 'http://proxy.uku.im:8888' - }, + 'skip': 'Only available in China', }] @staticmethod @@ -94,7 +94,7 @@ class LetvIE(InfoExtractor): play_json = self._download_json( play_json_req, - media_id, 'playJson data') + media_id, 'Downloading playJson data') # Check for errors playstatus = play_json['playstatus'] @@ -135,7 +135,7 @@ class LetvIE(InfoExtractor): } if format_id[-1:] == 'p': - url_info_dict['height'] = format_id[:-1] + url_info_dict['height'] = int_or_none(format_id[:-1]) urls.append(url_info_dict)