ãã³ãã³åç»ã§ getflv ãå¼ã³åºãã¨ãã«ä¾¿å©ãªGMç¨ã©ã¤ãã©ãª
NicoFilter Tabãæ¸ãã¨ãã«ä½¿ã£ãé¢æ°ãã©ã¤ãã©ãªåãã¾ãããgistã«ã¢ãããã¼ããã¦ããã¾ããニコニコ動画でgetFlvを呼び出す関数
æ¦è¦
ãã³ãã³åç»ç¨ã®GMã¹ã¯ãªãããæ¸ãã¨ãã«ï¼http://flapi.nicovideo.jp/api/getflv/sm*****ãå¼ã³åºãå¦çãå¿ è¦ã«ãªããã¨ãããã¾ãããã®APIã¸ã®ã¢ã¯ã»ã¹ãç°¡åã«ããã©ã¤ãã©ãªã§ããAPIã®å¼ã³åºãåæ°ãæ¸ããã¦ï¼ã¢ã¯ã»ã¹å¶éã«ã²ã£ããããªãããã«ããã®ãç®çã®1ã¤ã§ãã
使ãæ¹
GMã¹ã¯ãªããã®åé ã§
// @require https://gist.github.com/raw/670311/2a32978c5b58a477af62c7ae3e4123403c873f8a/nicovideo_getFlv.js
ãªã©ã¨è¨è¿°ãã¦ããã¾ã (æå®ããURLã¯ï¼ææ°çã®ãã®ã«ãã¦ãããã¨ããªã¹ã¹ã¡ãã¾ããä¸è¨ã®gistã®ãªã³ã¯å ããå ¥æã§ãã¾ã)ãããã¦ï¼getflvã®æ å ±ãåå¾ãããã¨ããã§
nicovideo_getFlv('sm9', function(obj, responseText) { ... });
ãããªæãã§æ¸ãã¾ããresponseTextã«ã¯APIã«ã¢ã¯ã»ã¹ãã¦å¾ãããæååãï¼objã«ã¯ãã®æååããã¼ã¹ããçµæã®ãªãã¸ã§ã¯ããä»£å ¥ããã¾ããobjã®ãã©ã¼ãããã¯ä»¥ä¸ã®ãããªæã
{ "thread_id": "1173206704", "l": "111", "url": "http://smile-pcm31.nicovideo.jp/smile?v=8702.9279", "link": "http://www.smilevideo.jp/view/8702/43375", "ms": "http://msg.nicovideo.jp/7/api/", "user_id": <ã¦ã¼ã¶ã¼ID>, "is_premium": "1", "nickname": <ããã¯ãã¼ã >, "time": "1289361631", "done": "true", "feedrev": "9eb78", "ng_rv": "434", "ng_up": [ ["ã¯ã¼","ã¯ããããããããããããããããããããããããããããã"], ["ã©ã¼","ã©ããããããããããããããããããããããããããããã"], ["ãã£ã¡ã¼","ãã£ã¡ãâãããã£ã¡ãâã"], ["ã¤ã¼","ã¤ããããããããããããããããããããããããããããããããããããããããã"] ], "hms": "hiroba01.nicovideo.jp", "hmsp": "2530", "hmst": "1000000006", "hmstk": "1289361691.cROP5uDxwti4Dfb-3rFLRXoGIow", "rpu": { "count": 1031240, "users": [ <ã¦ã¼ã¶ã¼å1>, ..., <ã¦ã¼ã¶ã¼ån> ], "extra":0 } }
åå¤ã®æå³ã«ã¤ãã¦ã¯getflvの戻り値についてまとめ(2010年8月版) - MineAPの(開発)日記ãåç §ãã¦ãã ããã