Skip to content

Instantly share code, notes, and snippets.

@laughingclouds
Created August 24, 2021 08:19
Show Gist options
  • Save laughingclouds/fa88921739bcd970cf85ac4e79ac3a7c to your computer and use it in GitHub Desktop.
Save laughingclouds/fa88921739bcd970cf85ac4e79ac3a7c to your computer and use it in GitHub Desktop.
Code related to instagram foo.
let feed = document.getElementsByTagName('article')[0];
let __reactInternalInstanceKey = Object.keys(feed).filter(k=>k.startsWith('__reactInternalInstance'))[0]
let posts = feed[__reactInternalInstanceKey].return.stateNode.state.combinedPosts
/**
'posts' is an array of objects that has information of your instagram posts
This code is from a file in my repo https://github.com/laughingclouds/igpms/blob/main/util/extractor.py
which in turn is taken from another project (more info in the repo).
**/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment