mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 16:53:56 +03:00
13d40fa694
* Change entry point to you_get.__main__:main * New entry point for development (you-get-dev): you_get.__main__:main_dev * you_get.extractor -> you_get.extractors
16 lines
498 B
Python
Executable File
16 lines
498 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
__all__ = ['khan_download']
|
|
|
|
from ..common import *
|
|
from .youtube import YouTube
|
|
|
|
def khan_download(url, output_dir='.', merge=True, info_only=False):
|
|
html = get_content(url)
|
|
youtube_url = re.search('<meta property="og:video" content="([^"]+)', html).group(1)
|
|
YouTube().download_by_url(youtube_url, output_dir=output_dir, merge=merge, info_only=info_only)
|
|
|
|
site_info = "khanacademy.org"
|
|
download = khan_download
|
|
download_playlist = playlist_not_supported('khan')
|