58.gif

Search (advanced search)
Use this Search form before posting, asking or make a new thread.
Tips: Use Quotation mark to search words (eg. "How To Make Money Online")

05-22-2015, 07:07 PM (This post was last modified: 02-09-2017 06:04 PM by xfactor.)
Post: #1
[TUT] Sort Pinterest Pin Result from Largest to Smallest Repins Count
Hi Guys,

I just want to share how to sort the pinterest result based on their repins count.

I think this will be useful if you need some viral ideas for your blog or facebook page.

You only need firefox browser. (not tested with Chrome)

Step by step
1. Open pinterest.com and login with your account.
2. Type keyword on search bar.

[Image: result1.png]

3. Press Ctrl+Shift+K

[Image: result2.png]

4. Copy the code below and paste it under prompt box. See the picture above.

Code:
var script = document.createElement('script');script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js";

Code:
var script = document.createElement('script');script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js";document.getElementsByTagName('head')[0].appendChild(script);
var pages = 10;
var count = 0;
var mylist = [];
var timeout;
load();

function load(){

  $('.Pin').each(function(){
    mylist.push( $(this)[0] )
  });

  $(window).scrollTop( $(document).height() );

  timeout = window.setTimeout(load, 4000);

  count++;
  if(count==pages){
      finish();
  }
}

function finish(){
    window.clearTimeout(timeout)
    console.log(mylist.length);

    var list = mylist.filter(function(f){
      if( $(f).find('.repinCountSmall').length>0 ){
        return f;
      }
    });

    console.log(list);

    list.sort(function(a, b) {
       var compA = Number( $(a).find('.repinCountSmall').text().trim() );
       var compB = Number( $(b).find('.repinCountSmall').text().trim() );
       return (compA == compB) ? 0 : (compA > compB) ? -1 : 1;
    });

    $(".Grid").before('<div id="organized"/>').remove();

    $.each(list, function(idx, itm) {
      $("#organized").append($(itm));
    });

    $('.Pin').css({'clear': 'both', 'position': 'static'});
}

5. Press enter, and boom!! All pins will sort by their repins count.

[Image: result3.png]

Please add reputation if this useful for you! SmileSmileSmile
05-23-2015, 06:10 PM
Post: #2
RE: [TUT] Sort Pinterest Pin Result from Largest to Smallest Repins Count
Nice share thanks a lot :)
06-04-2015, 12:37 PM
Post: #3
RE: [TUT] Sort Pinterest Pin Result from Largest to Smallest Repins Count
update

if you want to open more than 5 pages, (5 scroll down) change the variable code

Code:
var pages = [change this number];
06-05-2015, 01:38 AM
Post: #4
RE: [TUT] Sort Pinterest Pin Result from Largest to Smallest Repins Count
good sharing.thanks
06-30-2015, 03:57 AM
Post: #5
RE: [TUT] Sort Pinterest Pin Result from Largest to Smallest Repins Count
nice thanks i try it later :)
72.gif
07-03-2015, 11:32 AM
Post: #6
RE: [TUT] Sort Pinterest Pin Result from Largest to Smallest Repins Count
Let me try. Rep added.
07-17-2015, 12:12 PM
Post: #7
RE: [TUT] Sort Pinterest Pin Result from Largest to Smallest Repins Count
Neat trick. Thanks for the code xfactor! Repped!
Be awesome! :)
07-17-2015, 04:32 PM
Post: #8
RE: [TUT] Sort Pinterest Pin Result from Largest to Smallest Repins Count
Thanks bro, but I'm getting syntax error
[url= http://bestblackhatforum.com/Thread-Gene...ad]General + Sig Rules for BBHF [Updated FEB 2020] **Must Read**
[/url]
08-11-2015, 03:03 PM (This post was last modified: 08-11-2015 03:03 PM by xfactor.)
Post: #9
RE: [TUT] Sort Pinterest Pin Result from Largest to Smallest Repins Count
(07-17-2015 04:32 PM)rgbiz Wrote:  Thanks bro, but I'm getting syntax error

If you copy the code, don't forget to delete
"Read more @ bestblackhatforum.com : ...."

This signature message will automatically included into your clipboard when you press ctrl + c
03-27-2016, 08:56 AM
Post: #10
RE: [TUT] Sort Pinterest Pin Result from Largest to Smallest Repins Count
I get this error:

TypeError: $(...).each is not a function
61.gif




5.gif