From ce8bdb18e05645e4a6cacab9c167f7f23586f347 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 3 Aug 2016 13:50:47 +0200 Subject: [PATCH] Have newline in id files This is better. A line in a textfile must terminate with a \n character. --- instaloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instaloader.py b/instaloader.py index c88bf6e..08d9c00 100755 --- a/instaloader.py +++ b/instaloader.py @@ -344,7 +344,7 @@ def check_id(profile, session, json_data, quiet): os.makedirs(profile.lower(), exist_ok=True) with open(profile + "/id", 'w') as text_file: profile_id = json_data['entry_data']['ProfilePage'][0]['user']['id'] - text_file.write(profile_id) + text_file.write(profile_id+"\n") log("Stored ID {0} for profile {1}.".format(profile_id, profile), quiet=quiet) return profile raise ProfileNotExistsException("Profile {0} does not exist.".format(profile))