Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 24, 2017, 05:31 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: LinkGrabber: Grabs all links on a webpage and exports as a text file.  (Read 13614 times)

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 638
    • View Profile
    • Donate to Member
http://scancode.dcme...kgrabber-install.htm

It's a bookmarklet that grabs all links on a webpage and exports them as a text file.. Enjoy.

Edit: typo
« Last Edit: April 12, 2008, 09:33 AM by scancode »

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,258
    • View Profile
    • Donate to Member
sounds good, scancode.. will try this out later. btw, will it work on Firefox?

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
It will, lanux. It was tested under ie, ff and opera.

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,543
    • View Profile
    • Donate to Member
this is very interesting

can it save the txt file though?

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 638
    • View Profile
    • Donate to Member
this is very interesting

can it save the txt file though?

Sure it can, I can add a button, but it'll work in IE only. You can always right-click on it :)

This one will save it as HTML / TXT on IE6
javascript:var%20i;var%20o_0=window.open('','o_0','width=450,height=250,status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1');o_0.document.open('text/plain','replace');for%20(i=0;i%3Cdocument.links.length;i++){o_0.document.write(document.links[i].href+'\r\n\r\n');}%20o_0.document.title='Links';o_0.document.close();o_0.document.execCommand("SaveAs");void%200;
« Last Edit: April 12, 2008, 09:32 AM by scancode »

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,543
    • View Profile
    • Donate to Member
very nice!

how can I add regex filters to display specific links (or text) ? eg *.some.com/*.pdf

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 638
    • View Profile
    • Donate to Member
Honestly, that escapes my knowledge. You'd better off parsing the list.
« Last Edit: April 12, 2008, 11:18 AM by scancode »

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,543
    • View Profile
    • Donate to Member
thanks your work is brilliant

it also gives me many ideas

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 638
    • View Profile
    • Donate to Member
Here's a cleaned up version, in case you want to add the regexp yourself.
Thank you for your kind words  :)
Show Source Code
Code: Javascript [Select]
  1. var i;
  2. var o_0 = window.open('', 'o_0', 'width=450,height=250,status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1');
  3. o_0.document.open('text/plain', 'replace');
  4. for (i = 0; i < document.links.length; i++) {
  5.     o_0.document.write(document.links[i].href + '\r\n\r\n');
  6. }
  7. o_0.document.title = 'Links';
  8. o_0.document.close();
  9. o_0.document.execCommand("SaveAs"); // ie only; show save as dialog
  10. void 0;

« Last Edit: April 12, 2008, 11:19 AM by scancode »

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 638
    • View Profile
    • Donate to Member
Woot! Regexp is working.

javascript:var i;var p_0=prompt("Enter your regexp (default%3A don't filter)%3A","/()/");eval("p_0="%2Bp_0%2B";");var o_0=window.open('','o_0','width=450,height=250,status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1');o_0.document.open('text/plain','replace');for(i=0;i%3Cdocument.links.length;i%2B%2B){if(p_0.test(document.links[i].href)){o_0.document.write(document.links[i].href%2B'%5Cr%5Cn%5Cr%5Cn')}}o_0.document.title='Links';o_0.document.close();o_0.document.execCommand("SaveAs");void 0;

Code: Javascript [Select]
  1. var i;
  2. var p_0 = prompt("Enter your regexp (default: don't filter):", "/()/");
  3. eval("p_0=" + p_0 + ";"); // HELP! Is there a cleaner way? // for example sets a comment.
  4. var o_0 = window.open('', 'o_0', 'width=450,height=250,status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1');
  5. o_0.document.open('text/plain', 'replace');
  6. for (i = 0; i < document.links.length; i++) {
  7.     if (p_0.test(document.links[i].href)) {
  8.         o_0.document.write(document.links[i].href + '\r\n\r\n')
  9.     }
  10. }
  11. o_0.document.title = 'Links';
  12. o_0.document.close();
  13. o_0.document.execCommand("SaveAs");
  14. void 0;

Enjoy :)

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,543
    • View Profile
    • Donate to Member
marvelous!
many thanks!
 :)

jimmsta

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1
    • View Profile
    • Donate to Member
Awesome :D