In my application, I'm trying to create a simple way to link to profiles of NFL players on NFL.com based on their name. Because NFL.com's player profile pages do not have a predictable URL structure, I am trying to create a link to Google's "I Feel Lucky" results based on a URL string:
http://www.google.com/search?q=site:nfl.com+firstname+lastname+profile&btnI
The problem is: sometimes the link works and takes me to the first "I Feel Lucky" result, but sometimes it just takes me to the standard Google search results page.
Example 1 (takes me to first result, NFL.com):
http://www.google.com/search?q=site:nfl.com+Larry+Fitzgerald+profile&btnI
Example 2 (takes me to the Google search results page, not the first result)
http://www.google.com/search?q=site:nfl.com+Rob+Housler+profile&btnI
Is there a way to ensure I get the "I Feel Lucky" result every time?
EDIT
Here are additional examples of links that work and don't work. Note that the only differences between these links are the search terms yet some transfer you to the first Google result website and some take you to the actual search results.
Work (i.e. we are sent to the site of the first Google Result, NFL.com)
Don't Work (i.e. we are sent to Google Search results page)
http://www.google.com/search?q=stackoverflow&btnI Replace Stack Oveflow with your words
Whilst I agree with some of the comments regarding I'm feeling lucky being unpredictable, I managed to get those links working by including the players name in quotations. I'm not sure why it didn't work normally though. The following links work:
http://www.google.com/search?q=site:nfl.com+%22Rob+Housler%22+profile&btnI http://www.google.com/search?q=site:nfl.com+%22Larry+Fitzgerald%22+profile&btnI
Since I'm not from the US, I don't know any other names off the top of my head to test it with, but those two links work. %22 is quotations, so make sure to leave it around the players name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With