Skip to content

Instantly share code, notes, and snippets.

@sergray
Created February 8, 2017 21:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergray/dfdde916159c8f1aa65ae0f24e311ef0 to your computer and use it in GitHub Desktop.
Save sergray/dfdde916159c8f1aa65ae0f24e311ef0 to your computer and use it in GitHub Desktop.
Export Autoscout24 favorites in a JSON list
var favorites = [];
$$('.listItem').forEach(function(it){
favorites.push({
link: it.attributes['data-detailpage'].value,
image: $('.listImage img', it).attr('src'),
price: $('.listItemHeaderPrice', it).text().trim(),
date: $('.listItemHeaderEZ', it).text().trim(),
mileage: $('.listItemHeaderMileage', it).text().trim(),
title: $('span.fontLoud', it).text().trim(),
address: $('span.fontSilent', it).text().trim()
} );
})
console.log(JSON.stringify(favorites));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment