google applescript open first approved site.

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
37pens
Harmless
Posts: 6
Joined: Mon Dec 06, 2004 2:28 am

google applescript open first approved site.

Post 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.
User avatar
zaudragon
Growl Team
Posts: 1852
Joined: Sat Dec 04, 2004 5:05 am
Location: Kensington, CA, USA
Contact:

Post by zaudragon »

Only way I know:

In Google search for:

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

Given List I dunno
Blog | X(tras)
Communists code without classes.
37pens
Harmless
Posts: 6
Joined: Mon Dec 06, 2004 2:28 am

Post 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.
User avatar
zaudragon
Growl Team
Posts: 1852
Joined: Sat Dec 04, 2004 5:05 am
Location: Kensington, CA, USA
Contact:

Post by zaudragon »

Just to tell you, iTunes Expanded has a lyrics feature, but uses a shell script instead
Blog | X(tras)
Communists code without classes.
User avatar
lankybutmacho
Harmless
Posts: 10
Joined: Mon Dec 13, 2004 5:44 pm
Location: Madison, WI

Post 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
37pens
Harmless
Posts: 6
Joined: Mon Dec 06, 2004 2:28 am

Post 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.
Post Reply