Created
October 15, 2019 17:35
-
-
Save erajanraja24/8664954f4a1e3ffe473ed10709d61f50 to your computer and use it in GitHub Desktop.
Scraper Instagram Follower Counts
This file contains hidden or 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
/* | |
Sign up here http://bit.ly/freescraperAPIkey and get the API Key | |
Refer Docs for detailed documentation http://bit.ly/scraperDocs | |
*/ | |
function scrapeInstaFollowers() { | |
var url1 = "http://api.scraperapi.com?api_key=YOURAPIKEY&url=" | |
var url2 = "https://www.instagram.com/_aamirkhan" | |
var finalUrl = url1+url2; | |
var getContent = UrlFetchApp.fetch(finalUrl).getContentText(); | |
var getContent = getContent.trim(); | |
var followerRegex = /meta property="og:description".*Followers/gi | |
var getFollowers = getContent.match(followerRegex) | |
var followers = getFollowers[0].replace('meta property="og:description" content="',"") | |
Logger.log(followers) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment