Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Scrape digitalagencynetwork.com
// execute in chrome snippets section on a page such as http://digitalagencynetwork.com/agencies/melbourne/
// copy result into a csv file an voila
var $ = jQuery;
var results = [];
$('.entry .threecol-two.last').each(function(){
var title = $(this).find('h3').text();
var address = $(this).find('a').attr('href');
var emailMatch = $(this).first('h6').text().match(/[\w\.]+@[\w\.]+/);
var email = emailMatch ? emailMatch[0] : 'unknown';
results.push([title,address,email].join(','));
});
console.log(results.join('\n'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.