I was just getting started with Instaloader but when i tried to download a specific post, my code wouldn't continue
from instaloader import Instaloader, Profile, Post
# Get instance
L = Instaloader()
L.login(username, password)
print("login complete")
post = Post.from_shortcode(L.context, "CEPH-B0M8B9")
L.download_post(post, target='test')
print("test")
It wouldn't print the "test"
And I was also having some difficulties changing the filename as which the post would get saved. In the documentation it says:
target (Union[str, Path]) – Target name, i.e. profile name, #hashtag, :feed; for filename.
but that wasn't helping me at all :/
I appreciate every answer :D
After looking at the source code i found the problem.
The download_post function does a lot of stuff and you can deactivate them with these lines:
L = Instaloader()
L.post_metadata_txt_pattern = ""
L.download_geotags = False
L.save_metadata = False
L.save_metadata_json = False
L.download_comments = False
The issue why the code wouldn't continue was that the function just took forever to download all comments
Hope this will help and safe some time for someone in the future :)