I feel lucky button could be implemented by directing search straight into the url used by google for I'm feeling lucky button. This way we need not go through the google search page.
Scraping the page found by I'm lucky button, finding the search query and downloading the file straightaway.
basically open the top search query on a new tab