Skip to content

Instantly share code, notes, and snippets.

@gwuah
Created January 12, 2018 15:59
Show Gist options
  • Save gwuah/9af1b73dae097ae1fcf6bc980814adc0 to your computer and use it in GitHub Desktop.
Save gwuah/9af1b73dae097ae1fcf6bc980814adc0 to your computer and use it in GitHub Desktop.
this script contains a function that scrapes api keys for your twitter app.. just run it in console and claim your object
const getData = (self) => $(self).siblings().html()
function authKeys() {
const main = {} ;
$("span").each(function(el) {
switch ($(this).text()) {
case "Consumer Key (API Key)" :
main.consumer_key = getData(this)
break;
case "Consumer Secret (API Secret)" :
main.consumer_secret = getData(this)
break;
case "Owner" :
main.owner = getData(this)
break;
case "Owner ID" :
main.ownerID = getData(this)
break;
case "Access Token" :
main.acess_token = getData(this)
break;
case "Access Token Secret" :
main.acess_token_secret = getData(this)
break;
}
})
return main
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment