Home > Uncategorized > Play a song with youtube

Play a song with youtube

Say you know the artist and the title of a song and you want to get it played with youtube. How to do that?

First, let’s review what we should know about the “I’m Feeling Lucky” button (long description here). On Google Search, when you type in a search term and you hit the “I’m Feeling Lucky” button, you’ll be redirected to the first search hit. Simply it skips showing the full search result.

If instant results are activated, you can’t click on the “I’m Feeling Lucky” button. In this case visit the Preferences page and switch off the instant results.

Now, back to the original problem. Say you want to play the song “The Prodigy: Out of Space”. Use the following search term:

site:youtube.com inurl:http://www.youtube.com/watch?v= The Prodigy Out of Space

And hit the “I’m Feeling Lucky” button. You are redirected to the video clip.

Now, let’s say you want to open this video clip from a script. You’ll have to visit the following link:

https://www.google.com/search?btnI=I'm+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=site:youtube.com%20inurl:http://www.youtube.com/watch?v=%20The Prodigy Out of Space

You can try it here. Click on this link.

This trick is from here.

You collect your favourite songs in a plain text file. Each line in the file contains the artist’s name and the title of the song. Write a script that picks a random line and opens the song on youtube.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: