mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-12 13:47:16 +08:00
fixed coding conventions and enchanced regular expression for title to be more flexible
This commit is contained in:
parent
7b87830077
commit
b722f62c10
@ -4,6 +4,7 @@ from __future__ import unicode_literals
|
|||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..compat import compat_urllib_parse_unquote
|
from ..compat import compat_urllib_parse_unquote
|
||||||
|
|
||||||
|
|
||||||
class ManyVidsIE(InfoExtractor):
|
class ManyVidsIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://www.manyvids\.com/Video/(?P<id>[0-9]+)'
|
_VALID_URL = r'https?://www.manyvids\.com/Video/(?P<id>[0-9]+)'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
@ -24,8 +25,7 @@ class ManyVidsIE(InfoExtractor):
|
|||||||
video_url = compat_urllib_parse_unquote(self._search_regex(
|
video_url = compat_urllib_parse_unquote(self._search_regex(
|
||||||
r'data-video-filepath=\"(.+?)\"', webpage, 'video URL', default=''))
|
r'data-video-filepath=\"(.+?)\"', webpage, 'video URL', default=''))
|
||||||
|
|
||||||
title = self._html_search_regex(r'<h2 class="m-a-0" title=\"(.+?)\">',
|
title = self._html_search_regex(r'<h2[^>]+class="m-a-0"[^>]*>([^<]+)', webpage, 'title')
|
||||||
webpage, 'title')
|
|
||||||
formats.append({
|
formats.append({
|
||||||
'url': video_url
|
'url': video_url
|
||||||
})
|
})
|
||||||
@ -33,5 +33,4 @@ class ManyVidsIE(InfoExtractor):
|
|||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user