projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[mwave] Add Mwave Meet & Greet extractor
[youtube-dl]
/
youtube_dl
/
extractor
/
vuclip.py
diff --git
a/youtube_dl/extractor/vuclip.py
b/youtube_dl/extractor/vuclip.py
index ab1e7946eabc391da8f0a52600e6ef6fbd4acba3..eaa888f005cc61c53b8f45c3e3b93633083b17ed 100644
(file)
--- a/
youtube_dl/extractor/vuclip.py
+++ b/
youtube_dl/extractor/vuclip.py
@@
-3,8
+3,10
@@
from __future__ import unicode_literals
import re
from .common import InfoExtractor
import re
from .common import InfoExtractor
-from ..
utils
import (
+from ..
compat
import (
compat_urllib_parse_urlparse,
compat_urllib_parse_urlparse,
+)
+from ..utils import (
ExtractorError,
parse_duration,
qualities,
ExtractorError,
parse_duration,
qualities,
@@
-12,7
+14,7
@@
from ..utils import (
class VuClipIE(InfoExtractor):
class VuClipIE(InfoExtractor):
- _VALID_URL = r'http://(?:m\.)?vuclip\.com/w\?.*?cid=(?P<id>[0-9]+)'
+ _VALID_URL = r'http
s?
://(?:m\.)?vuclip\.com/w\?.*?cid=(?P<id>[0-9]+)'
_TEST = {
'url': 'http://m.vuclip.com/w?cid=922692425&fid=70295&z=1010&nvar&frm=index.html',
_TEST = {
'url': 'http://m.vuclip.com/w?cid=922692425&fid=70295&z=1010&nvar&frm=index.html',
@@
-25,10
+27,9
@@
class VuClipIE(InfoExtractor):
}
def _real_extract(self, url):
}
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
-
+ video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
webpage = self._download_webpage(url, video_id)
+
ad_m = re.search(
r'''value="No.*?" onClick="location.href='([^"']+)'"''', webpage)
if ad_m:
ad_m = re.search(
r'''value="No.*?" onClick="location.href='([^"']+)'"''', webpage)
if ad_m:
@@
-48,12
+49,12
@@
class VuClipIE(InfoExtractor):
links_code = self._search_regex(
r'''(?xs)
(?:
links_code = self._search_regex(
r'''(?xs)
(?:
- <img\s+src="
/im
/play.gif".*?>|
+ <img\s+src="
[^"]*
/play.gif".*?>|
<!--\ player\ end\ -->\s*</div><!--\ thumb\ end-->
)
(.*?)
(?:
<!--\ player\ end\ -->\s*</div><!--\ thumb\ end-->
)
(.*?)
(?:
- <a\s+href="fblike
'
|<div\s+class="social">
+ <a\s+href="fblike|<div\s+class="social">
)
''', webpage, 'links')
title = self._html_search_regex(
)
''', webpage, 'links')
title = self._html_search_regex(