mirror of
https://github.com/instaloader/instaloader.git
synced 2024-11-04 09:22:29 +01:00
parent
087a69ef7e
commit
a99d1875e5
@ -293,6 +293,7 @@ def download_profiles(targets, username=None, password=None, sessionfile=None,
|
|||||||
session = get_anonymous_session()
|
session = get_anonymous_session()
|
||||||
# Iterate through targets list and download them
|
# Iterate through targets list and download them
|
||||||
failedtargets = []
|
failedtargets = []
|
||||||
|
try:
|
||||||
for target in targets:
|
for target in targets:
|
||||||
try:
|
try:
|
||||||
download(target, session, profile_pic_only, download_videos,
|
download(target, session, profile_pic_only, download_videos,
|
||||||
@ -300,6 +301,8 @@ def download_profiles(targets, username=None, password=None, sessionfile=None,
|
|||||||
except NonfatalException as err:
|
except NonfatalException as err:
|
||||||
failedtargets.append(target)
|
failedtargets.append(target)
|
||||||
print(err, file=sys.stderr)
|
print(err, file=sys.stderr)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("\nInterrupted by user.", file=sys.stderr)
|
||||||
if len(targets) > 1 and len(failedtargets) > 0:
|
if len(targets) > 1 and len(failedtargets) > 0:
|
||||||
print("Errors occured (see above) while downloading profiles: %s" %
|
print("Errors occured (see above) while downloading profiles: %s" %
|
||||||
", ".join(failedtargets), file=sys.stderr)
|
", ".join(failedtargets), file=sys.stderr)
|
||||||
@ -335,8 +338,6 @@ def main():
|
|||||||
[0,0] if args.no_sleep else [0.25,2], args.quiet)
|
[0,0] if args.no_sleep else [0.25,2], args.quiet)
|
||||||
except InstaloaderException as err:
|
except InstaloaderException as err:
|
||||||
raise SystemExit("Fatal error: %s" % err)
|
raise SystemExit("Fatal error: %s" % err)
|
||||||
except KeyboardInterrupt:
|
|
||||||
print("Interrupted by user.", file=sys.stderr)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user