「twitpic.dms」の版間の差分

提供: Yourpedia
移動: 案内検索
(修正)
11行目: 11行目:
 
//version=0.01
 
//version=0.01
 
//hint=twitterのページ・twitpicのサムネイルページからURLを渡してください
 
//hint=twitterのページ・twitpicのサムネイルページからURLを渡してください
//match=http://twitpic.com/
+
//match=http://(www.)?twitpic.com/
 
//author=Abcdefgh
 
//author=Abcdefgh
 
//path=program
 
//path=program

2011年5月16日 (月) 08:33時点における版

Irvineを使ってTwitpicの画像を落とすためのスクリプト。サムネイル画像が表示されるページや、URLが貼られたTwitterのページから「IrvineへすべてのURLを送る」で使う。

  1. [ttp://mxmkitchen.com/2009/03/13/2357.php ここ]からIrvineとDorothy2.zipをDL、インストールする
  2. 「(Irvineが有るフォルダ)¥Dorothy2¥program¥」に「twitpic.dms」を以下の内容で作成する
  3. Irvineを起動後、上記サイトに出てる設定を行う
    1. 「ツール」→「メインメニュー」→「動画ダウンロード2設定」で「twitpic」にチェックを入れて、「ファイル」→「保存して終了」をクリック、それ以外は同様
  4. 後は、ほぼ上記サイトの説明通り
//Dorothy2
//caption=twitpic
//version=0.01
//hint=twitterのページ・twitpicのサムネイルページからURLを渡してください
//match=http://(www.)?twitpic.com/
//author=Abcdefgh
//path=program
//priority=500
//end
//created 22,Jan.,2011 by Abcdefgh
//ファイル名の単純変換が不可能な為

function(){
	println('twitpic.dms start');
	// 画像紹介ページをダウンロード
	common_load('download');
	var http = download(urlinfo.url);
	if(http.responseHeader.code != 200){
		return retry('error--->' + http.responseHeader.code);
	}
	// 本画像URLを抽出
	if (!http.data.match(/src=\"([^"]+\/(full|large)\/[^"]+)\"/)) {
		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;
}