mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 21:22:51 +01:00
[letv] Correct regular expressions and fix a typo
This commit is contained in:
parent
7a8fef3173
commit
f3bc19a989
@ -28,9 +28,9 @@
|
|||||||
|
|
||||||
class LetvIE(InfoExtractor):
|
class LetvIE(InfoExtractor):
|
||||||
IE_DESC = '乐视网'
|
IE_DESC = '乐视网'
|
||||||
_VALID_URL = r'http://www\.le\.com/ptv/vplay/(?P<id>\d+).html'
|
_VALID_URL = r'http://www\.le\.com/ptv/vplay/(?P<id>\d+)\.html'
|
||||||
|
|
||||||
_URL_TEMPLATE = r'http://www.le.com/ptv/vplay/%s.html'
|
_URL_TEMPLATE = 'http://www.le.com/ptv/vplay/%s.html'
|
||||||
|
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://www.le.com/ptv/vplay/22005890.html',
|
'url': 'http://www.le.com/ptv/vplay/22005890.html',
|
||||||
@ -196,7 +196,7 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
|
|
||||||
class LetvTvIE(InfoExtractor):
|
class LetvTvIE(InfoExtractor):
|
||||||
_VALID_URL = r'http://www.le.com/tv/(?P<id>\d+).html'
|
_VALID_URL = r'http://www\.le\.com/tv/(?P<id>\d+)\.html'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://www.le.com/tv/46177.html',
|
'url': 'http://www.le.com/tv/46177.html',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
@ -213,7 +213,7 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
# Currently old domain names are still used in playlists
|
# Currently old domain names are still used in playlists
|
||||||
media_ids = orderedSet(re.findall(
|
media_ids = orderedSet(re.findall(
|
||||||
r'http://www.letv.com/ptv/vplay/(\d+).html', page))
|
r'http://www\.letv\.com/ptv/vplay/(\d+)\.html', page))
|
||||||
entries = [self.url_result(LetvIE._URL_TEMPLATE % media_id, ie='Letv')
|
entries = [self.url_result(LetvIE._URL_TEMPLATE % media_id, ie='Letv')
|
||||||
for media_id in media_ids]
|
for media_id in media_ids]
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
|
|
||||||
class LetvPlaylistIE(LetvTvIE):
|
class LetvPlaylistIE(LetvTvIE):
|
||||||
_VALID_URL = r'http://tv.le.com/[a-z]+/(?P<id>[a-z]+)/index.s?html'
|
_VALID_URL = r'http://tv\.le\.com/[a-z]+/(?P<id>[a-z]+)/index\.s?html'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://tv.le.com/izt/wuzetian/index.html',
|
'url': 'http://tv.le.com/izt/wuzetian/index.html',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
|
Loading…
Reference in New Issue
Block a user