[biqle] Fix extraction.

Fixes #11471
This commit is contained in:
Kacper Michajłow 2017-01-01 04:55:17 +01:00
parent 890d44b005
commit c7a8f51d29
2 changed files with 14 additions and 13 deletions

View File

@ -15,24 +15,26 @@ class BIQLEIE(InfoExtractor):
'title': 'Foo Fighters - The Pretender (Live at Wembley Stadium)',
'uploader': 'Andrey Rogozin',
'upload_date': '20110605',
'timestamp': 1307314500,
}
}, {
'url': 'https://biqle.org/watch/-44781847_168547604',
'url': 'https://biqle.ru/watch/-44781847_168547604',
'md5': '7f24e72af1db0edf7c1aaba513174f97',
'info_dict': {
'id': '168547604',
'ext': 'mp4',
'title': 'Ребенок в шоке от автоматической мойки',
'uploader': 'Dmitry Kotov',
'upload_date': '20140404',
'timestamp': 1396644240,
},
'skip': ' This video was marked as adult. Embedding adult videos on external sites is prohibited.',
}]
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
embed_url = self._proto_relative_url(self._search_regex(
r'<iframe.+?src="((?:http:)?//daxab\.com/[^"]+)".*?></iframe>', webpage, 'embed url'))
r'<iframe.+?src="((?:https?:)?//daxab\.com/[^"]+)".*?></iframe>', webpage, 'embed url'))
return {
'_type': 'url_transparent',

View File

@ -87,7 +87,7 @@ class VKIE(VKBaseIE):
(?:(?:m|new)\.)?vk\.com/video_|
(?:www\.)?daxab.com/
)
ext\.php\?(?P<embed_query>.*?\boid=(?P<oid>-?\d+).*?\bid=(?P<id>\d+).*)|
(?:ext\.php|player/)\?(?P<embed_query>.*?\boid=(?P<oid>-?\d+).*?\bid=(?P<id>\d+).*)|
(?:
(?:(?:m|new)\.)?vk\.com/(?:.+?\?.*?z=)?video|
(?:www\.)?daxab.com/embed/
@ -293,15 +293,14 @@ class VKIE(VKBaseIE):
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('videoid')
if video_id:
if not video_id:
video_id = '%s_%s' % (mobj.group('oid'), mobj.group('id'))
info_url = 'https://vk.com/al_video.php?act=show&al=1&module=video&video=%s' % video_id
# Some videos (removed?) can only be downloaded with list id specified
list_id = mobj.group('list_id')
if list_id:
info_url += '&list=%s' % list_id
else:
info_url = 'http://vk.com/video_ext.php?' + mobj.group('embed_query')
video_id = '%s_%s' % (mobj.group('oid'), mobj.group('id'))
info_page = self._download_webpage(info_url, video_id)
@ -389,7 +388,7 @@ class VKIE(VKBaseIE):
if not data:
data = self._parse_json(
self._search_regex(
r'<!json>\s*({.+?})\s*<!>', info_page, 'json', default='{}'),
r'<!json>({(?:(?!<!>).)*})(?:<!>|$)', info_page, 'json', default='{}'),
video_id)
if data:
data = data['player']['params'][0]