1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-07-07 11:42:38 +02:00

Make instaloader usable as package

This commit allows doing `import instaloader` when instaloader is
located in a subdirectory "instaloader". This makes it easier to use
instaloader e.g. when it is imported using git submodules feature.
This commit is contained in:
Alexander Graf 2016-08-18 09:58:07 +02:00
parent 0088ee5e9e
commit 5dc9be47cb
3 changed files with 15 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
__pycache__/

4
__init__.py Normal file
View File

@ -0,0 +1,4 @@
"""Simple downloader to fetch all Instagram pics and captions from a given profile"""
# pylint:disable=wildcard-import
from .instaloader import *

View File

@ -13,6 +13,16 @@ else:
win_unicode_console.enable()
WINUNICODE = True
# List of public objects which are provided by `import instaloader`.
__all__ = ['BadCredentialsException', 'ConnectionException', 'InstaloaderException',
'LoginRequiredException', 'NonfatalException', 'PrivateProfileNotFollowedException',
'ProfileHasNoPicsException', 'ProfileNotExistsException', 'check_id', 'copy_session',
'default_http_header', 'download', 'download_pic', 'download_profilepic',
'download_profiles', 'epoch_to_string', 'get_anonymous_session',
'get_default_session_filename', 'get_file_extension', 'get_followees', 'get_id_by_username',
'get_json', 'get_last_id', 'get_logged_in_session', 'get_session', 'get_username_by_id',
'load_session', 'log', 'main', 'save_caption', 'save_session', 'test_login']
class InstaloaderException(Exception):
"""Base exception for this script"""
pass