1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-11-04 09:22:29 +01:00

Have newline in id files

This is better. A line in a textfile must terminate with a \n character.
This commit is contained in:
Alexander Graf 2016-08-03 13:50:47 +02:00
parent 77d0d272fc
commit ce8bdb18e0

View File

@ -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))