[Solved] Using InstaLoader in Python module
I am trying to download photos related to a hashtag for image analysis using Instaloader. I found a comprehensive way in GitHub repository, how to execute it in Terminal.
However, I need to integrate the script in Python notebook.
Here is the script: $ instaloader --no-videos --no-metadata-json --no-captions "#streetart"
I tried this:
import instaloader
loader = instaloader.Instaloader()
loader.download_hashtag('amg', max_count=20)
But I could not find a way to filter the results to return pictures only as output. Can anybody help me please?
Many thanks in advance.
Solution #1:
import instaloader
loader = instaloader.Instaloader(download_videos=False, save_metadata=False, post_metadata_txt_pattern='')
loader.download_hashtag('streetart', max_count=20)
The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .