diff options
| author | Yen Chi Hsuan <yan12125@gmail.com> | 2016-03-03 02:50:12 +0800 | 
|---|---|---|
| committer | Yen Chi Hsuan <yan12125@gmail.com> | 2016-03-03 03:27:55 +0800 | 
| commit | f3bc19a989d9f6d6b21abd4271cb99a18897069f (patch) | |
| tree | 257b9eeb2c2c0e509bd5aa3a6f812e5303134dff | |
| parent | 7a8fef31730f0a9823c1379f67902dd95a9ea580 (diff) | |
[letv] Correct regular expressions and fix a typo
| -rw-r--r-- | youtube_dl/extractor/letv.py | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/youtube_dl/extractor/letv.py b/youtube_dl/extractor/letv.py index 2ece30839..ba8126f75 100644 --- a/youtube_dl/extractor/letv.py +++ b/youtube_dl/extractor/letv.py @@ -28,9 +28,9 @@ from ..utils import (  class LetvIE(InfoExtractor):      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 = [{          'url': 'http://www.le.com/ptv/vplay/22005890.html', @@ -196,7 +196,7 @@ class LetvIE(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 = [{          'url': 'http://www.le.com/tv/46177.html',          'info_dict': { @@ -213,7 +213,7 @@ class LetvTvIE(InfoExtractor):          # Currently old domain names are still used in playlists          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')                     for media_id in media_ids] @@ -226,7 +226,7 @@ class LetvTvIE(InfoExtractor):  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 = [{          'url': 'http://tv.le.com/izt/wuzetian/index.html',          'info_dict': { | 
