[videomega] support embedded URLs

This commit is contained in:
Mort Yao 2016-05-27 03:12:49 +02:00
parent 8879bca209
commit 71ec9cad22
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -15,6 +15,9 @@ def videomega_download(url, output_dir='.', merge=True, info_only=False, **kwarg
('Cookie', 'noadvtday=0')]
request.install_opener(opener)
if re.search(r'view\.php', url):
php_url = url
else:
content = get_content(url)
m = re.search(r'ref="([^"]*)";\s*width="([^"]*)";\s*height="([^"]*)"', content)
ref = m.group(1)