Irvineを使ってロケタッチ(写真つきタッチ)の静止画を落とすためのスクリプト。Twitter・Twilogのページから「IrvineへすべてのURLを送る」で使う。本スクリプトは「t-co.dms」からの呼び出しにも使われる。
//Dorothy2 //caption=tou.ch //version=0.01 //hint=tou.chのサムネイルページからURLを渡してください //match=http://tou.ch/ //author=Abcdefgh //path=program //priority=500 //end //created 18,Mar.,2013 by Abcdefgh //ファイル名の単純変換が不可能な為 function(){ println('tou-ch.dms start'); // 画像紹介ページをダウンロード common_load('download'); var http = download(urlinfo.url,true); if(http.responseHeader.code != 200){ return retry('error--->' + http.responseHeader.code); } // 本画像URLを抽出 if (!http.data.match(/content=\"(http:\/\/api.loctouch.com\/stf\/picture\/[^"]+)\"/)) { println('error---> オリジナルサイズの画像が見つかりません'); exit(); } var title= RegExp.$1; var url = new URL(title); urlinfo.url = url.url; headers.host = url.host; //ファイル名を抽出 if (!title.match(/([^\/]+)$/)) { println('error---> ファイル名が見つかりません'); exit(); } Dorothy.fileName = RegExp.$1; }