Created
January 12, 2018 15:59
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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