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:
parent
0088ee5e9e
commit
5dc9be47cb
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
__pycache__/
|
4
__init__.py
Normal file
4
__init__.py
Normal 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 *
|
@ -13,6 +13,16 @@ else:
|
|||||||
win_unicode_console.enable()
|
win_unicode_console.enable()
|
||||||
WINUNICODE = True
|
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):
|
class InstaloaderException(Exception):
|
||||||
"""Base exception for this script"""
|
"""Base exception for this script"""
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user