Using InstaLoader in Python module

▼魔方 西西 提交于 2020-12-12 11:57:07

问题


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.


回答1:


import instaloader

loader = instaloader.Instaloader(download_videos=False, save_metadata=False, post_metadata_txt_pattern='')
loader.download_hashtag('streetart', max_count=20)


来源:https://stackoverflow.com/questions/60031639/using-instaloader-in-python-module

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!