yahoopho.dms
提供: Yourpedia
Irvineを使ってYahoo! Photoの画像を落とすためのスクリプト。サムネイル画像が表示されるページから「IrvineへすべてのURLを送る」で使う。本画像が落とせない場合にプレビュー画像を落とすように改良。
- [ttp://mxmkitchen.com/2009/03/13/2357.php ここ]からIrvineとDorothy2.zipをDL、インストールする
- 「(Irvineが有るフォルダ)¥Dorothy2¥program¥」に「yahoopho.dms」を以下の内容で作成する
- Irvineを起動後、上記サイトに出てる設定を行う
- 「ツール」→「メインメニュー」→「動画ダウンロード2設定」で「Yahoo! Photo」にチェックを入れて、「ファイル」→「保存して終了」をクリック、それ以外は同様
- 後は、ほぼ上記サイトの説明通り
//Dorothy2
//caption=Yahoo! Photo
//version=0.05
//hint=「Hires」があるページのURLを渡してください
//match=http://photos.yahoo.co.jp/ph/
//author=Abcdefgh
//path=program
//priority=500
//end
//created 20,Dec.,2010 by Abcdefgh
//modified 23,Dec.,2010 by Abcdefgh
//modified 29,Dec.,2010 by Abcdefgh
//modified 30,Jan.,2011 by Abcdefgh
//ファイル名の単純変換が不可能な為
function(){
println('yahoopho.dms start');
// 渡されたURLをHiresページのURLに変換
var title=unescape(urlinfo.url).fromUTF8toSJIS();
if (!title.match(/([^"]+dnm=[0-9a-f]{4}[.][a-z]+)/)) {
println('error---> HiresページURLが見つかりません');
exit();
}
var title=unescape(RegExp.$1 + '&.hires=t').fromUTF8toSJIS();
var url = new URL(title);
urlinfo.url = url.url;
headers.host = url.host;
// Hiresページをダウンロード
common_load('download');
var http = download(urlinfo.url);
if(http.responseHeader.code != 200){
return retry('error--->' + http.responseHeader.code);
}
// 本画像URLを抽出
if (!http.data.match(/<img src=\"([^"]+\/__[sh]r_\/[0-9a-f]{4}[^"]+)\"/)) {
println('error---> オリジナルサイズの画像が見つかりません');
exit();
}
var title=RegExp.$1;
var url = new URL(title);
urlinfo.url = url.url;
headers.host = url.host;
//ファイル名を抽出
if (!title.match(/([0-9a-f]{4}[.][a-z]+)/)) {
println('error---> 画像ファイル名が見つかりません');
exit();
}
Dorothy.fileName = RegExp.$1;
}