Page 1 of 1

google applescript open first approved site.

Posted: Mon Jan 31, 2005 4:51 am
by 37pens
Sorry if that's a shitty name for this thread but that's the best thing i could come up with.

Does anyone know how it would be possible to make applescript do a google search, and then open up the first result that is from a site froma given list?

ex. site_list = {lyricsfreaks, Purelyrics...}
Google "Hey Joe Jimi Hendrix lyrics"

and make applescript open the first URL that contains one of those keywords?

It seems like this should be feasible to me, but I'd love some help to speed the process along.

Thanks a lot.

Posted: Mon Jan 31, 2005 6:04 am
by zaudragon
Only way I know:

In Google search for:

text site:http://www.lyricsfreak.com

Given List I dunno

Posted: Mon Jan 31, 2005 6:31 am
by 37pens
I'm thinking that i could make applescript curl the google search, and find "lyricsfreak" and then take that everything from "http - html" and then curl that URL. but then there's problems such as:

How do you make applescript search for several things at once and find the first. (Could search for them in steps with If statements, but it might be slow.)

Those sites would have to be on the first results page... etc.

Posted: Mon Jan 31, 2005 6:46 am
by zaudragon
Just to tell you, iTunes Expanded has a lyrics feature, but uses a shell script instead

Posted: Mon Jan 31, 2005 1:45 pm
by lankybutmacho
If I'm reading right, you're talking basically about applescripting the function of Google's "I'm Feeling Lucky" button. Instead, just use this URL: http://www.google.com/search?hl=en&lr=& ... ling+Lucky

Posted: Mon Jan 31, 2005 10:50 pm
by 37pens
zaudragon wrote:Just to tell you, iTunes Expanded has a lyrics feature, but uses a shell script instead
I checked it out, but it grabs the lyrics from the ID3 tag.