mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 00:33:58 +03:00
add support for Instagram, fix #200
This commit is contained in:
parent
2cc7fb5e8a
commit
22ffb14ca2
@ -22,6 +22,7 @@ Fork me on GitHub: <https://github.com/soimort/you-get>
|
|||||||
* Google Drive <http://docs.google.com>
|
* Google Drive <http://docs.google.com>
|
||||||
* Tumblr <http://www.tumblr.com>
|
* Tumblr <http://www.tumblr.com>
|
||||||
* Vine <http://vine.co>
|
* Vine <http://vine.co>
|
||||||
|
* Instagram <http://instagram.com>
|
||||||
* SoundCloud <http://soundcloud.com>
|
* SoundCloud <http://soundcloud.com>
|
||||||
* Mixcloud <http://www.mixcloud.com>
|
* Mixcloud <http://www.mixcloud.com>
|
||||||
* Freesound <http://www.freesound.org>
|
* Freesound <http://www.freesound.org>
|
||||||
@ -239,6 +240,7 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y
|
|||||||
* Google Drive <http://docs.google.com>
|
* Google Drive <http://docs.google.com>
|
||||||
* Tumblr <http://www.tumblr.com>
|
* Tumblr <http://www.tumblr.com>
|
||||||
* Vine <http://vine.co>
|
* Vine <http://vine.co>
|
||||||
|
* Instagram <http://instagram.com>
|
||||||
* SoundCloud <http://soundcloud.com>
|
* SoundCloud <http://soundcloud.com>
|
||||||
* Mixcloud <http://www.mixcloud.com>
|
* Mixcloud <http://www.mixcloud.com>
|
||||||
* Freesound <http://www.freesound.org>
|
* Freesound <http://www.freesound.org>
|
||||||
|
@ -25,6 +25,7 @@ Supported Sites (As of Now)
|
|||||||
* Google Drive http://docs.google.com
|
* Google Drive http://docs.google.com
|
||||||
* Tumblr http://www.tumblr.com
|
* Tumblr http://www.tumblr.com
|
||||||
* Vine http://vine.co
|
* Vine http://vine.co
|
||||||
|
* Instagram http://instagram.com
|
||||||
* SoundCloud http://soundcloud.com
|
* SoundCloud http://soundcloud.com
|
||||||
* Mixcloud http://www.mixcloud.com
|
* Mixcloud http://www.mixcloud.com
|
||||||
* Freesound http://www.freesound.org
|
* Freesound http://www.freesound.org
|
||||||
|
@ -34,6 +34,7 @@ def url_to_module(url):
|
|||||||
'iask': sina,
|
'iask': sina,
|
||||||
'ifeng': ifeng,
|
'ifeng': ifeng,
|
||||||
'in': alive,
|
'in': alive,
|
||||||
|
'instagram': instagram,
|
||||||
'iqiyi': iqiyi,
|
'iqiyi': iqiyi,
|
||||||
'joy': joy,
|
'joy': joy,
|
||||||
'kankanews': bilibili,
|
'kankanews': bilibili,
|
||||||
|
@ -13,6 +13,7 @@ from .facebook import *
|
|||||||
from .freesound import *
|
from .freesound import *
|
||||||
from .google import *
|
from .google import *
|
||||||
from .ifeng import *
|
from .ifeng import *
|
||||||
|
from .instagram import *
|
||||||
from .iqiyi import *
|
from .iqiyi import *
|
||||||
from .joy import *
|
from .joy import *
|
||||||
from .ku6 import *
|
from .ku6 import *
|
||||||
|
22
src/you_get/downloader/instagram.py
Normal file
22
src/you_get/downloader/instagram.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__all__ = ['instagram_download']
|
||||||
|
|
||||||
|
from ..common import *
|
||||||
|
|
||||||
|
def instagram_download(url, output_dir = '.', merge = True, info_only = False):
|
||||||
|
html = get_html(url)
|
||||||
|
|
||||||
|
id = r1(r'instagram.com/p/([^/]+)/', html)
|
||||||
|
description = r1(r'<meta property="og:description" content="([^"]*)"', html)
|
||||||
|
title = description + " [" + id + "]"
|
||||||
|
url = r1(r'<meta property="og:video" content="([^"]*)"', html)
|
||||||
|
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 = "Instagram"
|
||||||
|
download = instagram_download
|
||||||
|
download_playlist = playlist_not_supported('instagram')
|
Loading…
Reference in New Issue
Block a user