= Media URI Parser - MURI A simple to use media URI Parser. Pass a URI in, get helpful information out. MURI Currently supports: * Youtube * Vimeo * Flickr * Imageshack * Photobucket == Installation & basic usage Install muri as a ruby gem (you might need to run this command as root by prepending +sudo+ to it): $ gem install muri Using muri is just as easy! a = Muri.parse('http://www.youtube.com/watch?v=blahblahblah&feature=rec-LGOUT-exp_fresh+div-1r-1-HM') a.service # 'Youtube' a.media_id # 'blahblahblah' a.media_url # 'http://www.youtube.com/watch?v=blahblahblah' (flickr media_url's provide the flic.kr/p/ID short url) a.original_url # 'http://www.youtube.com/watch?v=blahblahblah&feature=rec-LGOUT-exp_fresh+div-1r-1-HM' a.uri # URI object for 'http://www.youtube.com/watch?v=blahblahblah&feature=rec-LGOUT-exp_fresh+div-1r-1-HM' Due to variations in information which can be gathered from a uri, some services provide more information than others. For example: * All but Imageshack have a media_api_id, which is the ID which can be used in API calls to the related services. Typically the same as media_id. a.media_api_id # 'blahblahblah' * A direct media url for Youtube, Photobucket, and Flickr (http://img#{num}.imageshack.us/img#{num}/#{NUMBER}/#{IMAGENAME} format) a.website # 'http://www.youtube.com/v/blahblahblah' * Content type for Imageshack, Photobucket and Flickr URI's (flickr in the http://farm#{num}.static.flickr.com/ format) a.content_type # 'jpg' (Content Type also for Imageshack and Photobucket) * Thumbnails URL for Youtube Photobucket, and Flickr (flickr in the http://farm#{num}.static.flickr.com/ format) a.media_thumbnail * Some additional information may be provided, which can be determined by looking through each filters code. If an attribute is not present, muri returns +nil+. I plan on including more services _and_ more parse information with updates. That being said, MURI is currently not production quality. Please use with caution and in development only. Thank you. == Contact If you would like to get in contact with me, my email is bananastalktome@gmail.com. I appreciate any information or assistance reverse-engineering media website URI's.