projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[youtube] Relax URL expansion in description
[youtube-dl]
/
youtube_dl
/
extractor
/
leeco.py
diff --git
a/youtube_dl/extractor/leeco.py
b/youtube_dl/extractor/leeco.py
index df47e88ba98a8d69d2dca43cf20ccb7366232f57..63f581cd9fe44013ce8ec85ce540d04d0df73713 100644
(file)
--- a/
youtube_dl/extractor/leeco.py
+++ b/
youtube_dl/extractor/leeco.py
@@
-11,7
+11,7
@@
from .common import InfoExtractor
from ..compat import (
compat_ord,
compat_str,
from ..compat import (
compat_ord,
compat_str,
- compat_urllib_parse,
+ compat_urllib_parse
_urlencode
,
)
from ..utils import (
determine_ext,
)
from ..utils import (
determine_ext,
@@
-28,7
+28,7
@@
from ..utils import (
class LeIE(InfoExtractor):
IE_DESC = '乐视网'
class LeIE(InfoExtractor):
IE_DESC = '乐视网'
- _VALID_URL = r'http
://www\.le\.com/ptv/vplay
/(?P<id>\d+)\.html'
+ _VALID_URL = r'http
s?://(?:www\.le\.com/ptv/vplay|sports\.le\.com/video)
/(?P<id>\d+)\.html'
_URL_TEMPLATE = 'http://www.le.com/ptv/vplay/%s.html'
_URL_TEMPLATE = 'http://www.le.com/ptv/vplay/%s.html'
@@
-69,6
+69,9
@@
class LeIE(InfoExtractor):
'hls_prefer_native': True,
},
'skip': 'Only available in China',
'hls_prefer_native': True,
},
'skip': 'Only available in China',
+ }, {
+ 'url': 'http://sports.le.com/video/25737697.html',
+ 'only_matching': True,
}]
@staticmethod
}]
@staticmethod
@@
-122,7
+125,7
@@
class LeIE(InfoExtractor):
'domain': 'www.le.com'
}
play_json_req = sanitized_Request(
'domain': 'www.le.com'
}
play_json_req = sanitized_Request(
- 'http://api.le.com/mms/out/video/playJson?' + compat_urllib_parse
.
urlencode(params)
+ 'http://api.le.com/mms/out/video/playJson?' + compat_urllib_parse
_
urlencode(params)
)
cn_verification_proxy = self._downloader.params.get('cn_verification_proxy')
if cn_verification_proxy:
)
cn_verification_proxy = self._downloader.params.get('cn_verification_proxy')
if cn_verification_proxy:
@@
-151,7
+154,7
@@
class LeIE(InfoExtractor):
for format_id in formats:
if format_id in dispatch:
media_url = playurl['domain'][0] + dispatch[format_id][0]
for format_id in formats:
if format_id in dispatch:
media_url = playurl['domain'][0] + dispatch[format_id][0]
- media_url += '&' + compat_urllib_parse
.
urlencode({
+ media_url += '&' + compat_urllib_parse
_
urlencode({
'm3v': 1,
'format': 1,
'expect': 3,
'm3v': 1,
'format': 1,
'expect': 3,
@@
-196,7
+199,7
@@
class LeIE(InfoExtractor):
class LePlaylistIE(InfoExtractor):
class LePlaylistIE(InfoExtractor):
- _VALID_URL = r'http
://[a-z]+\.le\.com/
[a-z]+/(?P<id>[a-z0-9_]+)'
+ _VALID_URL = r'http
s?://[a-z]+\.le\.com/(?!video)
[a-z]+/(?P<id>[a-z0-9_]+)'
_TESTS = [{
'url': 'http://www.le.com/tv/46177.html',
_TESTS = [{
'url': 'http://www.le.com/tv/46177.html',
@@
-305,7
+308,7
@@
class LetvCloudIE(InfoExtractor):
}
self.sign_data(data)
return self._download_json(
}
self.sign_data(data)
return self._download_json(
- 'http://api.letvcloud.com/gpc.php?' + compat_urllib_parse
.
urlencode(data),
+ 'http://api.letvcloud.com/gpc.php?' + compat_urllib_parse
_
urlencode(data),
media_id, 'Downloading playJson data for type %s' % cf)
play_json = get_play_json(cf, time.time())
media_id, 'Downloading playJson data for type %s' % cf)
play_json = get_play_json(cf, time.time())