「instagra.dms」の版間の差分
提供: Yourpedia
細 (リサイズ前サイズ画像dlに対応) |
細 (Mario Yonezawa (トーク) による編集を Abcdefgh による直前の版へ差し戻しました) |
| (他の1人の利用者による、間の1版が非表示) | |
(相違点なし)
| |
2019年2月8日 (金) 20:57時点における最新版
Irvineを使ってインスタグラムの静止画を落とすためのスクリプト。Twitter・Twilogのページから「IrvineへすべてのURLを送る」で使う。本スクリプトは「t-co.dms」からの呼び出しにも使われる。
- ここからIrvineとDorothy2.zipをDL、インストールする
- 「(Irvineが有るフォルダ)¥Dorothy2¥program¥」に「Instagra.dms」を以下の内容で作成する
- Irvineを起動後、上記サイトに出てる設定を行う
- 「ツール」→「メインメニュー」→「動画ダウンロード2設定」で「Instagram」にチェックを入れて、「ファイル」→「保存して終了」をクリック、それ以外は同様
- 呼び出し元の「t-co.dms」も上記同様に用意しておく
- 後は、ほぼ上記サイトの説明通り
//Dorothy2
//caption=Instagram
//version=0.03
//hint=Twitter・TwilogのページからURLを渡してください
//match=https?://(www[.])?(i[.])?[Ii]nstagr[.]?am
//author=Abcdefgh
//path=program
//priority=500
//end
//created 14,Dec.,2011 by Abcdefgh
//modified 27,Apr.,2014 by Abcdefgh
//modified 7,Apr.,2017 by Abcdefgh
//リサイズ前サイズ画像dlに対応
function(){
println('instagra.dms start');
// 画像紹介ページをダウンロード
var title = urlinfo.url;
title = title.replace(/http:/,"https:");
var url = new URL(title);
urlinfo.url = url.url;
headers.host = url.host;
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(/og:image\" content=\"([^"]+)\"/)) {
println('error---> オリジナルサイズの画像が見つかりません');
exit();
}
var title = RegExp.$1;
var title2 = title.match(/^https?:\/\/[^\/]+\//)[0];
var title3 = title.match(/\/[^\/]+$/)[0];
var title = title2 + title3;
var url = new URL(title);
urlinfo.url = url.url;
headers.host = url.host;
//ファイル名を抽出
if (!title.match(/([^\/]+)$/)) {
println('error---> ファイル名が見つかりません');
exit();
}
Dorothy.fileName = RegExp.$1;
}