Anonymously saving instagram stories to personal cloud.

Holy sheit its been a long time since I wrote here. Been busy with some big personal projects and college. FeelsBadMan. :-/

Anyways…. I recently (last night) built an OSINT tool to save instagram stories to dropbox anonymously. Here’s how it works ->

  • Use headless chrome to visit this page -> ‘’+userName . Why use a third party website ? Because I am lazy asf and was trying to speedrun this project. moving on….
  • Find x-paths of all the latest stories and extract the media uris using almighty regex.
  • Download the media using requests whilst ignoring all the ssl warnings. (don’t do this in prod)
  • Maintain a local database of the stories you’ve downloaded with timestamps and stuff.
  • Upload all of the media you ripped to dropbox using their awesome api (seriously, they have the best api-docs I’ve read in a while).

Here’s the code ->

from selenium import webdriver
import time
import re
from import By
from selenium import webdriver
import time
import re
from import By
from import WebDriverWait
from import expected_conditions as EC
import requests
import dropbox
from tinydb import TinyDB, Query

# Declare yo user
user = 'doom'
storeFolder = "sauce/"

driver = webdriver.Chrome('chromedriver.exe')

# Upload to dropbox
uriList = []

def dropUpload(uris):
	dropbox_access_token= "" #Yo acess token goes here
	client = dropbox.Dropbox(dropbox_access_token)
	print("DataStore Connected")
	for uri in uris:
		to_path= "/"+uri
		client.files_upload(open(from_path, "rb").read(), to_path)
		print("Upload Komplete")

# Poor man's nosql store omegalul

def isPresent(url):
	db = TinyDB('db.json')
	p = Query()
	present =
		db.insert({'link': url, 'timestamp': time.time()})
		return False
		return True

# Coutesy Of StackOverFlow lol

def download_file(url,type):
		timestr = time.strftime("%Y%m%d-%H%M%S")
		local_filename = storeFolder+timestr+type
		r = requests.get(url,verify=False, stream=True)
		with open(local_filename, 'wb') as f:
			for chunk in r.iter_content(chunk_size=1024): 
				if chunk:
		return local_filename

# Ugly code don't look

wait = WebDriverWait(driver, 50)	# 50 Sec of summer
sauceCheck = wait.until(EC.visibility_of_element_located((By.XPATH, '/html/body/div[4]/div[3]/div/div[1]/div[1]/div/div')))
sauces = driver.find_elements_by_class_name('mb-4')
preSauces = []
for sauce in sauces:


# Video or an Image ?

for preSauce in preSauces:
	if preSauce.find("GraphVideo")!=-1:
		type_ = ".mp4"
	elif preSauce.find("GraphImage")!=-1:
		type_ = ".jpg"
	link = re.findall(r'(https?://\S+)', preSauce)[0].split('"')[0]


Couple of things to take care of ->

Dropbox requires to start directory names with “/” . Make sure to you give appropriate write permissions in the app console.

Now just package this script -> add it to a cron-job on a remote server and bam. Speedrun insta stalker any% complete xD.

Btw I am finishing up working on a really cool low-level driver written in go. I’ll post something about it soon. GGs till then.