mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 08:43:58 +03:00
Merge branch 'feature/vk-support' into develop
This commit is contained in:
commit
d594d35049
@ -60,6 +60,7 @@ __中文说明__已移至[wiki](https://github.com/soimort/you-get/wiki/%E4%B8%A
|
|||||||
* Baidu Wangpan (百度网盘) <http://pan.baidu.com>
|
* Baidu Wangpan (百度网盘) <http://pan.baidu.com>
|
||||||
* SongTaste <http://www.songtaste.com>
|
* SongTaste <http://www.songtaste.com>
|
||||||
* Alive.in.th <http://alive.in.th>
|
* Alive.in.th <http://alive.in.th>
|
||||||
|
* VK <http://vk.com>
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ Supported Sites (As of Now)
|
|||||||
* Baidu Wangpan (百度网盘) http://pan.baidu.com
|
* Baidu Wangpan (百度网盘) http://pan.baidu.com
|
||||||
* SongTaste http://www.songtaste.com
|
* SongTaste http://www.songtaste.com
|
||||||
* Alive.in.th http://alive.in.th
|
* Alive.in.th http://alive.in.th
|
||||||
|
* VK http://vk.com
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
@ -37,6 +37,7 @@ from .tumblr import *
|
|||||||
from .vid48 import *
|
from .vid48 import *
|
||||||
from .vimeo import *
|
from .vimeo import *
|
||||||
from .vine import *
|
from .vine import *
|
||||||
|
from .vk import *
|
||||||
from .w56 import *
|
from .w56 import *
|
||||||
from .xiami import *
|
from .xiami import *
|
||||||
from .yinyuetai import *
|
from .yinyuetai import *
|
||||||
|
@ -58,6 +58,7 @@ def url_to_module(url):
|
|||||||
'vid48': vid48,
|
'vid48': vid48,
|
||||||
'vimeo': vimeo,
|
'vimeo': vimeo,
|
||||||
'vine': vine,
|
'vine': vine,
|
||||||
|
'vk': vk,
|
||||||
'xiami': xiami,
|
'xiami': xiami,
|
||||||
'yinyuetai': yinyuetai,
|
'yinyuetai': yinyuetai,
|
||||||
'youku': youku,
|
'youku': youku,
|
||||||
|
25
src/you_get/extractor/vk.py
Normal file
25
src/you_get/extractor/vk.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__all__ = ['vk_download']
|
||||||
|
|
||||||
|
from ..common import *
|
||||||
|
|
||||||
|
def vk_download(url, output_dir='.', merge=True, info_only=False):
|
||||||
|
video_page = get_content(url)
|
||||||
|
title = unescape_html(r1(r'"title":"([^"]+)"', video_page))
|
||||||
|
info = dict(re.findall(r'\\"url(\d+)\\":\\"([^"]+)\\"', video_page))
|
||||||
|
for quality in ['1080', '720', '480', '360', '240']:
|
||||||
|
if quality in info:
|
||||||
|
url = re.sub(r'\\\\\\/', r'/', info[quality])
|
||||||
|
break
|
||||||
|
assert url
|
||||||
|
|
||||||
|
type, ext, size = url_info(url)
|
||||||
|
|
||||||
|
print_info(site_info, title, type, size)
|
||||||
|
if not info_only:
|
||||||
|
download_urls([url], title, ext, size, output_dir, merge=merge)
|
||||||
|
|
||||||
|
site_info = "VK.com"
|
||||||
|
download = vk_download
|
||||||
|
download_playlist = playlist_not_supported('vk')
|
Loading…
Reference in New Issue
Block a user