Fold All / Expand All

2008年3月20日 星期四

download mp3 or flv files from yam mymedia

two cases: mp3 or flv

a url example: http://mymedia.yam.com/m/1932303
the pattern can be /\/m\/([0-9]+)$/ for a PHP preg.

once we get the ID, append it to "http://mymedia.yam.com/api/a/?pID=". in the case 1932303, it would be "http://mymedia.yam.com/api/a/?pID=1932303". this link will return us two infomation: mp3file and totaltime. pattern for mp3file: "/mp3file=([^&]+)&/". that is the real location of mp3 file. referrer header is not required.

for flv file, the original swf use "http://mymedia.yam.com/api/m/?pID=" as the prefix. but in test, we can still use "http://mymedia.yam.com/api/a/?pID=" since we only need the value of furl. pattern for furl: "/furl=([^&]+)&/".

demo site

先前文章:
Google Custom Search on yam media

3 則留言:

匿名 提到...

It worked well, thanks a bunch~

wenbinbin 提到...

it doesn't work anymore. do you have a new way to download? thanks

franklai 提到...

For yam mymeida, please visit http://w.csie.org/~b91072/php/mymedia_get/

for YouTube, currently mymedia_get fails to retrieve useful download link, maybe http://keepvid.com/ can do this.