0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-27 03:03:01 +00:00

[infoq] Fix extraction (closes #6141)

This commit is contained in:
Yen Chi Hsuan 2015-07-03 11:53:37 +08:00
parent 66e568de3b
commit 91b21b2334

View file

@ -5,6 +5,7 @@
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urlparse,
)
@ -45,7 +46,7 @@ def _real_extract(self, url):
video_id, extension = video_filename.split('.')
http_base = self._search_regex(
r'EXPRESSINSTALL_SWF\s*=\s*"(https?://[^/"]+/)', webpage,
r'EXPRESSINSTALL_SWF\s*=\s*[^"]*"((?:https?:)?//[^/"]+/)', webpage,
'HTTP base URL')
formats = [{
@ -55,7 +56,7 @@ def _real_extract(self, url):
'play_path': playpath,
}, {
'format_id': 'http',
'url': http_base + real_id,
'url': compat_urlparse.urljoin(url, http_base) + real_id,
}]
self._sort_formats(formats)