Skip to content

Instantly share code, notes, and snippets.

@ycaty
ycaty / instagram_login.py
Last active Oct 2, 2021
Simple python 2.7 script for logging into instagram 2021
View instagram_login.py
import requests
import time
import random
username = 'your_username_here'
password = 'your_password_here'
def default_headers():
return {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36',
View Instagram User Tag Scraping 2020
Instagram scraping user tags 2020
Brief demonstration on how to scrape and collect user tags without needing login information.
A lot of data end points such as "viewing followers" is blocked by public users(not logged in).
This is a way to bypass one of these endpoints.
Scrape user tags (same as the url) -> instagram.com/username/tagged
https://www.instagram.com/graphql/query/?query_hash=31fe64d9463cbbe58319dced405c6206&variables={"id":"29883180","first":12}
Url Breakdown