Last active
August 29, 2015 13:58
-
-
Save wookiecooking/10083964 to your computer and use it in GitHub Desktop.
[coffeescript] Simple Google SERP Tracking
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
# GTrack: Simple Google SERP Tracking | |
# Notes: A simple app that tracks the position of a URL in google SERPs. No promises. | |
# LICENSE: MIT | |
# Author: Austin Turnage | |
gtrack = (url, keyword, results) -> | |
scraper = require("google-scraper") | |
scrape = new scraper.GoogleScraper( | |
keyword: keyword | |
language: "en" | |
results: results | |
) | |
scrape.getGoogleLinks (arrayLink) -> | |
i = 0 | |
while i < arrayLink.length | |
console.log url + " postion is " + i if arrayLink[i] is url | |
i += 1 | |
# Example Usage | |
gtrack "http://en.wikipedia.org/wiki/JavaScript", "javascript", 500 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment