Updates to code

Hey, I needed something like your code for a project I was working on. I needed to pipe search results from this program to another, and then download them, and then pipe those pages to be scanned. I was able to scan and process hundreds of pages. I had to modify the code quite a bit, but I appreciate you writing this. It saved me from having to write it from scratch.

There's a syntax error in your code on line 34 that prevents it from running. Also, your code appears to be identifying more links than it should be (perhaps Google changed their page layout).

Other than that, I'm submitting this code back to you as a courtesy. You can take some, all, or none of it. Cheers.  :)