#!/usr/bin/env python
__all__ = ['vk_download']
from ..common import *
def get_video_info(url):
video_page = get_content(url)
title = r1(r'
(.[^>]+?)
]+?)"', video_page)
for quality in ['.1080.', '.720.', '.480.', '.360.', '.240.']:
for source in sources:
if source.find(quality) != -1:
url = source
break
assert url
type, ext, size = url_info(url)
print_info(site_info, title, type, size)
return url, title, ext, size
def get_video_from_user_videolist(url):
ep = 'https://vk.com/al_video.php'
to_post = dict(act='show', al=1, module='direct', video=re.search(r'video(\d+_\d+)', url).group(1))
page = post_content(ep, post_data=to_post)
video_pt = r'