Skip to content

Instantly share code, notes, and snippets.

@nikhilw
Created August 20, 2015 06:56
Show Gist options
  • Save nikhilw/7b297e8aad1d197c000f to your computer and use it in GitHub Desktop.
Save nikhilw/7b297e8aad1d197c000f to your computer and use it in GitHub Desktop.
List all apps on a google play store page that are cheaper than a defined price
$(".display-price").each(function(i, app) {
if (parseInt($(app).text().replace(/Rs\.\s/gi, "")) < 50) {
var appDetails = $(app).parents(".details").find(".title");
if (appDetails.attr("title")) {
console.log(appDetails.attr("title") + ": https://play.google.com/" + appDetails.attr("href"))
// Or even: window.open()
}
}
});
//important parts:
//$(".display-price")
//var pr = $(".display-price")[0]
//parseInt($(pr).text().replace(/Rs\.\s/gi, ""))
//$(pr).parents(".details").find(".title")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment