mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
[videomega] support embedded URLs
This commit is contained in:
parent
8879bca209
commit
71ec9cad22
@ -15,11 +15,14 @@ def videomega_download(url, output_dir='.', merge=True, info_only=False, **kwarg
|
|||||||
('Cookie', 'noadvtday=0')]
|
('Cookie', 'noadvtday=0')]
|
||||||
request.install_opener(opener)
|
request.install_opener(opener)
|
||||||
|
|
||||||
content = get_content(url)
|
if re.search(r'view\.php', url):
|
||||||
m = re.search(r'ref="([^"]*)";\s*width="([^"]*)";\s*height="([^"]*)"', content)
|
php_url = url
|
||||||
ref = m.group(1)
|
else:
|
||||||
width, height = m.group(2), m.group(3)
|
content = get_content(url)
|
||||||
php_url = 'http://videomega.tv/view.php?ref=%s&width=%s&height=%s' % (ref, width, height)
|
m = re.search(r'ref="([^"]*)";\s*width="([^"]*)";\s*height="([^"]*)"', content)
|
||||||
|
ref = m.group(1)
|
||||||
|
width, height = m.group(2), m.group(3)
|
||||||
|
php_url = 'http://videomega.tv/view.php?ref=%s&width=%s&height=%s' % (ref, width, height)
|
||||||
content = get_content(php_url)
|
content = get_content(php_url)
|
||||||
|
|
||||||
title = match1(content, r'<title>(.*)</title>')
|
title = match1(content, r'<title>(.*)</title>')
|
||||||
|
Loading…
Reference in New Issue
Block a user