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.

Revisions

  1. nikhilw created this gist Aug 20, 2015.
    15 changes: 15 additions & 0 deletions parseAndLog.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    $(".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")