「yahoopho.dms」の版間の差分
提供: Yourpedia
細 (もう少し洗練) |
細 (Mario Yonezawa (トーク) による版 363296 を取り消し) |
||
| (2人の利用者による、間の4版が非表示) | |||
| 1行目: | 1行目: | ||
| − | [[Irvine]]を使って[[Yahoo! Photo]] | + | [[Irvine]]を使って[[Yahoo! Photo]]の画像を落とすためのスクリプト。サムネイル画像が表示されるページから「IrvineへすべてのURLを送る」で使う。本画像が落とせない場合にプレビュー画像を落とすように改良。 |
#[ttp://mxmkitchen.com/2009/03/13/2357.php ここ]からIrvineとDorothy2.zipをDL、インストールする | #[ttp://mxmkitchen.com/2009/03/13/2357.php ここ]からIrvineとDorothy2.zipをDL、インストールする | ||
#「(Irvineが有るフォルダ)¥Dorothy2¥program¥」に「yahoopho.dms」を以下の内容で作成する | #「(Irvineが有るフォルダ)¥Dorothy2¥program¥」に「yahoopho.dms」を以下の内容で作成する | ||
| 9行目: | 9行目: | ||
//Dorothy2 | //Dorothy2 | ||
//caption=Yahoo! Photo | //caption=Yahoo! Photo | ||
| − | //version=0. | + | //version=0.05 |
//hint=「Hires」があるページのURLを渡してください | //hint=「Hires」があるページのURLを渡してください | ||
//match=http://photos.yahoo.co.jp/ph/ | //match=http://photos.yahoo.co.jp/ph/ | ||
| 18行目: | 18行目: | ||
//created 20,Dec.,2010 by Abcdefgh | //created 20,Dec.,2010 by Abcdefgh | ||
//modified 23,Dec.,2010 by Abcdefgh | //modified 23,Dec.,2010 by Abcdefgh | ||
| + | //modified 29,Dec.,2010 by Abcdefgh | ||
| + | //modified 30,Jan.,2011 by Abcdefgh | ||
//ファイル名の単純変換が不可能な為 | //ファイル名の単純変換が不可能な為 | ||
function(){ | function(){ | ||
println('yahoopho.dms start'); | println('yahoopho.dms start'); | ||
| − | // | + | // 渡されたURLをHiresページのURLに変換 |
| − | + | var title=unescape(urlinfo.url); | |
| − | var title=unescape(urlinfo.url | + | if (!title.match(/(^.+dnm=[0-9a-f]{4}[.][a-z]+)/)) { |
| − | if (!title.match(/( | + | println('error---> HiresページURLが見つかりません'); |
| − | println('error---> | + | |
exit(); | exit(); | ||
} | } | ||
| − | var title=unescape(RegExp.$1 + '&.hires=t' | + | var title=unescape(RegExp.$1 + '&.hires=t'); |
var url = new URL(title); | var url = new URL(title); | ||
urlinfo.url = url.url; | urlinfo.url = url.url; | ||
headers.host = url.host; | headers.host = url.host; | ||
| − | // | + | // Hiresページをダウンロード |
common_load('download'); | common_load('download'); | ||
var http = download(urlinfo.url); | var http = download(urlinfo.url); | ||
| 40行目: | 41行目: | ||
return retry('error--->' + http.responseHeader.code); | return retry('error--->' + http.responseHeader.code); | ||
} | } | ||
| − | if (!http.data.match(/<img src=\"([^"]+\/ | + | // 本画像URLを抽出 |
| + | if (!http.data.match(/<img src=\"([^"]+\/__[sh]r_\/[0-9a-f]{4}[^"]+)\"/)) { | ||
println('error---> オリジナルサイズの画像が見つかりません'); | println('error---> オリジナルサイズの画像が見つかりません'); | ||
exit(); | exit(); | ||
} | } | ||
var title=RegExp.$1; | var title=RegExp.$1; | ||
| − | |||
var url = new URL(title); | var url = new URL(title); | ||
| − | |||
urlinfo.url = url.url; | urlinfo.url = url.url; | ||
headers.host = url.host; | headers.host = url.host; | ||
| + | //ファイル名を抽出 | ||
if (!title.match(/([0-9a-f]{4}[.][a-z]+)/)) { | if (!title.match(/([0-9a-f]{4}[.][a-z]+)/)) { | ||
println('error---> 画像ファイル名が見つかりません'); | println('error---> 画像ファイル名が見つかりません'); | ||
exit(); | exit(); | ||
} | } | ||
| − | + | Dorothy.fileName = RegExp.$1; | |
| − | + | ||
| − | + | ||
| − | + | ||
} | } | ||
</nowiki></pre> | </nowiki></pre> | ||
[[Category:Irvine用スクリプト]] | [[Category:Irvine用スクリプト]] | ||
2019年2月7日 (木) 23:39時点における最新版
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);
if (!title.match(/(^.+dnm=[0-9a-f]{4}[.][a-z]+)/)) {
println('error---> HiresページURLが見つかりません');
exit();
}
var title=unescape(RegExp.$1 + '&.hires=t');
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;
}