-
-
Save hackingsearch/2577223 to your computer and use it in GitHub Desktop.
Scraper with zombie.js
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
var user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.20 (KHTML, like Gecko) Chrome/19.0.1036.7 Safari/535.20'; | |
var Browser = require("zombie"); | |
var browser = new Browser({userAgent: user_agent, debug: true, waitFor: 10000}); | |
var url = 'https://accounts.google.com/ServiceLoginAuth'; | |
var root_path = 'https://www.google.com/webmasters/tools/'; | |
var login = '[email protected]'; | |
var password = 'foo'; | |
var Helpers = require ('./helpers'); | |
var helpers = new Helpers(this, {}); | |
browser.visit(url, function() { | |
browser.fill('Email', login). | |
fill('Passwd', password). | |
pressButton('signIn', function() { | |
browser.visit(helpers.build_gwt_url(root_path, 'homepage', {}), function() { | |
console.log(browser.html()); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment