Posts

, ,

Scraping Adsense Ads with PhantomJS

PhantomJS is a headless WebKit, which lets you run Javascript in a browser from the command line. It adds additional API calls which facilitate automated testing, screenshots, and scraping. I thought it would be interesting to write a script to retrieve Adsense destination URLs and text with PhantomJS. Extracting advertisement blocks requires fairly simple CSS […]

Sample Greasemonkey Script in Chrome to process local files

The following script will fire an alert box for local files: // ==UserScript== // @name Matcher // @descriptions Match Local Files // @version 1 // @match file://* // ==/UserScript== alert(1); Save as “match.user.js”. Drop into a Chrome tab and you will be prompted to install. These are done per user profile. Each time you re-install […]