Skip to content
This repository has been archived by the owner on Apr 24, 2021. It is now read-only.

Commit

Permalink
🎨 Improving structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Stef committed Jul 19, 2020
1 parent fe868d3 commit e823a68
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions instadown/ig.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ def get_link_by_end(after, idd, query_hash):
}

def main():
if len(sys.argv) > 3:
print('You have specified too many arguments')
sys.exit()
elif len(sys.argv) == 1 or len(sys.argv) == 2:
print("Usage: \n")
print("instadown 'user_name' 'query_hash'")
sys.exit()
try:
username = sys.argv[1]
query_hash = sys.argv[2]
Expand Down Expand Up @@ -134,6 +141,8 @@ def main():
except KeyboardInterrupt:
logging.info("\n\n" + str(image_counter) + " Images Downloaded!!")
logging.info(str(video_counter) + " Videos Downloaded!!")
except:
logging.info("\nOops! Some Error Occured!!")

if __name__ == '__main__':
main()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
EMAIL = 'sstefin@bk.ru'
AUTHOR = 'Stef'
REQUIRES_PYTHON = '>=3.6.0'
VERSION = '0.1.6'
VERSION = '0.1.7'

# What packages are required for this module to be executed?
REQUIRED = [
Expand Down

0 comments on commit e823a68

Please # to comment.