「instagra.dms」の版間の差分
提供: Yourpedia
細 (仕様変更) |
(仕様変更対応) |
||
| 10行目: | 10行目: | ||
//Dorothy2 | //Dorothy2 | ||
//caption=Instagram | //caption=Instagram | ||
| − | //version=0. | + | //version=0.02 |
//hint=Twitter・TwilogのページからURLを渡してください | //hint=Twitter・TwilogのページからURLを渡してください | ||
| − | //match=http://instagr[.]?am | + | //match=http://(i[.])?instagr[.]?am |
//author=Abcdefgh | //author=Abcdefgh | ||
//path=program | //path=program | ||
| 18行目: | 18行目: | ||
//end | //end | ||
//created 14,Dec.,2011 by Abcdefgh | //created 14,Dec.,2011 by Abcdefgh | ||
| + | //modified 27,Apr.,2014 by Abcdefgh | ||
//ファイル名の単純変換が不可能な為 | //ファイル名の単純変換が不可能な為 | ||
| 29行目: | 30行目: | ||
} | } | ||
// 本画像URLを抽出 | // 本画像URLを抽出 | ||
| − | if (!http.data.match(/ | + | if (!http.data.match(/og:image\" content=\"([^"]+)\"/)) { |
println('error---> オリジナルサイズの画像が見つかりません'); | println('error---> オリジナルサイズの画像が見つかりません'); | ||
exit(); | exit(); | ||
2014年4月28日 (月) 08:24時点における版
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.02
//hint=Twitter・TwilogのページからURLを渡してください
//match=http://(i[.])?instagr[.]?am
//author=Abcdefgh
//path=program
//priority=500
//end
//created 14,Dec.,2011 by Abcdefgh
//modified 27,Apr.,2014 by Abcdefgh
//ファイル名の単純変換が不可能な為
function(){
println('instagra.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(/og:image\" content=\"([^"]+)\"/)) {
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;
}