Posted By

rowntreerob on 02/09/11


Tagged

bookmark


Versions (?)

chrome bookmarks linkcheck


 / Published in: Bash
 

get urls from bookmarks, run wget against the list of urls, then parse the log looking for bad return codes

  1. grep '\"url\":' Bookmarks | awk '{ print $2}' | sed 's/"$//' | sed 's/^"//' > linkchecks # creates the list of urls to check
  2. wget --server-response --spider -o log_file2_wget -ilinkchecks # check the links for validity and produce log with return code values
  3. gawk '{ /^--/ {VAR=$3}; /^..HTTP/ {print VAR" "$2" "$3}; /timed.out.$/ {print VAR" "$2" "$3} }' log_file2_wget > log_http_rc
  4.  
  5. OUTPUT:
  6.  
  7.  
  8. http://www.macromedia.com/special/forums_down.html?forumid=15 301 Moved
  9. http://www.adobe.com/special/forums_down.html?forumid=15 200 OK
  10. http://www.outpost.com/peripherals/ 301 Moved
  11. http://frys.com/peripherals/ 404 Not
  12. http://4808.runbox.com/docs/en/help/manager/access/pop/default.doc 302 Moved

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: rowntreerob on February 9, 2011

chrome bookmarks in : users/${me}/appdata/local/google/chrome/user data/default/Bookmarks

You need to login to post a comment.