instagram-scraper: A Python Tool for Downloading Instagram Images and Videos
I’ll introduce instagram-scraper, a Python tool that scrapes Instagram and downloads images and videos.
First, install instagram-scraper.
pip install instagram-scraper
Execute the instagram-scraper command by specifying your Instagram account username and password with the —login_user and —login_pass options.
instagram_login_user='your_user' # Your username
instagram_login_pass='your_password' # Your password
target_username='scraping_target_username' # Username to scrape
instagram-scraper \\
$target_username \\
--login_user $instagram_login_user \\
--login_pass $instagram_login_pass
instagram_login_user='your_user' # Your username
instagram_login_pass='your_password' # Your password
# Tag to scrape
# https://www.instagram.com/explore/tags/javascriptlover/
target_tag='javascriptlover'
instagram-scraper \\
--login_user $instagram_login_user \\
--login_pass $instagram_login_pass \\
--tag $target_tag
That’s all about scraping Instagram images and videos with instagram-scraper from the Gemba.