1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Google] Javascript Trick to Quickly Extract Google Result Urls directly from your Browser

Discussion in 'Black Hat SEO Tools' started by nemsis, Apr 16, 2011.

  1. nemsis

    nemsis Junior Member

    Joined:
    Sep 27, 2009
    Messages:
    173
    Likes Received:
    283
    Hi,

    I was in need of a quick solution to extract google serp urls without having to run a scraper so I wrote this little script. I decided to share it because last time I shared a js code people loved it :)

    Step 1: Go to any google serp
    Code:
    Example: http://www.google.com/search?q=example
    Step 2: Paste this javascript code in your browser location bar
    Code:
    javascript: /* nemsis 4 bhw */ function g_rs() { var serpl = [];  for (var i=0; i < document.links.length; i++) {if  (document.links[i].getAttribute("class")=="l"){serpl[serpl.length] =  document.links[i];}}var gstr = ""; for (var i=0; i<serpl.length; i++)  {gstr += serpl[i] + "<br />";} gstr += "<p>Number of URLs:  "+serpl.length+"</p>"; gstr +=  unescape("%3C%70%3E%3C%73%6D%61%6C%6C%3E%6E%65%6D%73%69%73%20%34%20%3C%61%20%68%72%65%66%3D%27%68%74%74%70%3A%2F%2F%77%77%77%2E%62%6C%61%63%6B%68%61%74%77%6F%72%6C%64%2E%63%6F%6D%2F%62%6C%61%63%6B%68%61%74%2D%73%65%6F%2F%69%6E%64%65%78%2E%70%68%70%3F%72%65%66%65%72%72%65%72%69%64%3D%36%39%30%38%33%27%3E%62%68%77%3C%2F%61%3E%3C%2F%73%6D%61%6C%6C%3E%3C%2F%70%3E");  /* nemsis 4 bhw */ document.write(gstr); } g_rs();
    I hope this will be useful for some of you.

    Step 3: Enjoy and press the thanks button :)
     
    • Thanks Thanks x 16
  2. TheMatrix

    TheMatrix BANNED BANNED

    Joined:
    Dec 20, 2008
    Messages:
    3,444
    Likes Received:
    7,280
    Awesome man! Works like super charm. :)
     
  3. kazimir

    kazimir Newbie

    Joined:
    May 4, 2010
    Messages:
    36
    Likes Received:
    8
    Occupation:
    Student
    Home Page:
    Very usefule script, also it would be more useful if the script would extract results from more than 1 page

    good job nemsis
     
  4. jonauk

    jonauk Newbie

    Joined:
    Apr 12, 2011
    Messages:
    15
    Likes Received:
    1
    Great job, works exactly as described!...thank you
     
  5. Ziloo

    Ziloo Junior Member

    Joined:
    Dec 14, 2010
    Messages:
    129
    Likes Received:
    79
    Location:
    Europe, sometimes.
    Awesome script, doesn't seem to grab all the URLs though, not +1ed ones anyway :)
     
  6. meinewelt

    meinewelt Junior Member

    Joined:
    Jan 11, 2012
    Messages:
    159
    Likes Received:
    60
    Thanks, it doesnt seem to do anything anymore tho , probably google changed algos? Any other way to extract all titles of a google search?
     
  7. lanbo

    lanbo Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 23, 2009
    Messages:
    3,526
    Likes Received:
    609
    Home Page:
    Make sure you manually type in "javascript" as most browsers don't allow C+P.
     
  8. Dashing Dave

    Dashing Dave Newbie

    Joined:
    Dec 14, 2012
    Messages:
    17
    Likes Received:
    1
    Occupation:
    Student. Future Most Successful Business Man!
    Location:
    Dubai - United Arab Emirates.
    Thank You For The Share. Just Keep These Rocking Efforts & Work Up, Bro..........