細 (仕様変更) |
細 (仕様変更に対応) タグ: sourceedit |
||
(同じ利用者による、間の3版が非表示) | |||
8行目: | 8行目: | ||
<pre><nowiki> |
<pre><nowiki> |
||
//Dorothy2 |
//Dorothy2 |
||
− | //caption=Facebook静止画 |
+ | //caption=Facebook静止画4 |
− | //version=0. |
+ | //version=0.11 |
//hint=FacebookのサムネイルページからURLを渡してください |
//hint=FacebookのサムネイルページからURLを渡してください |
||
− | //match=facebook.com/ |
+ | //match=facebook.com/[0-9A-Za-z.]+/photos |
//author=Abcdefgh |
//author=Abcdefgh |
||
//path=program |
//path=program |
||
18行目: | 18行目: | ||
//created 4,Oct.,2012 by Abcdefgh |
//created 4,Oct.,2012 by Abcdefgh |
||
//modified 30,Oct.,2012 by Abcdefgh |
//modified 30,Oct.,2012 by Abcdefgh |
||
+ | //modified 16,Jan.,2016 by Abcdefgh |
||
//ファイル名の単純変換が不可能な為 |
//ファイル名の単純変換が不可能な為 |
||
function(){ |
function(){ |
||
− | println(' |
+ | println('faceboo4.dms start'); |
// 画像紹介ページをダウンロード |
// 画像紹介ページをダウンロード |
||
+ | var title = urlinfo.url.match(/photos\/[^\/]+\/([0-9]+)/)[0]; |
||
+ | if (!title) { |
||
⚫ | |||
⚫ | |||
+ | } |
||
+ | title2 = 'https://www.facebook.com/photo/download/?fbid=' + RegExp.$1; |
||
+ | |||
+ | var url = new URL(title2); |
||
+ | urlinfo.url = url.url; |
||
+ | headers.host = url.host; |
||
+ | |||
common_load('download'); |
common_load('download'); |
||
− | + | var http = download(urlinfo.url,true); |
|
− | var http = download(urlinfo.url); |
||
if(http.responseHeader.code != 200){ |
if(http.responseHeader.code != 200){ |
||
return retry('error--->' + http.responseHeader.code); |
return retry('error--->' + http.responseHeader.code); |
||
} |
} |
||
// 本画像URLを抽出 |
// 本画像URLを抽出 |
||
− | if (!http.data.match(/ |
+ | if (!http.data.match(/content=\"0;url=(https?:\/\/[^"?]+_[no][.](jpg|png)[?][^"]+)/)) { |
+ | println('error---> オリジナルサイズの画像が見つかりません'); |
||
− | if (!http.data.match(/=\"(http:\/\/[^"?]+_n.(jpg|png))/)) { |
||
+ | exit(); |
||
⚫ | |||
⚫ | |||
− | } |
||
} |
} |
||
− | var title= RegExp.$1; |
+ | var title= RegExp.$1.replace(/amp;/g,""); |
//ファイル名を抽出 |
//ファイル名を抽出 |
||
− | if (!title.match(/([^\/]+)$/)) { |
+ | if (!title.match(/([^\/?]+)[?][^"]+$/)) { |
println('error---> ファイル名が見つかりません'); |
println('error---> ファイル名が見つかりません'); |
||
exit(); |
exit(); |
||
} |
} |
||
Dorothy.fileName = RegExp.$1; |
Dorothy.fileName = 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; |
2016年1月16日 (土) 19:48時点における最新版
Irvineを使ってFacebookの画像を落とすためのスクリプト。サムネイル画像が表示されるページから「IrvineへすべてのURLを送る」で使う。
- ここからIrvineとDorothy2.zipをDL、インストールする
- 「(Irvineが有るフォルダ)¥Dorothy2¥program¥」に「facebook.dms」を以下の内容で作成する
- Irvineを起動後、上記サイトに出てる設定を行う
- 「ツール」→「メインメニュー」→「動画ダウンロード2設定」で「Facebook静止画」にチェックを入れて、「ファイル」→「保存して終了」をクリック、それ以外は同様
- 後は、ほぼ上記サイトの説明通り
//Dorothy2 //caption=Facebook静止画4 //version=0.11 //hint=FacebookのサムネイルページからURLを渡してください //match=facebook.com/[0-9A-Za-z.]+/photos //author=Abcdefgh //path=program //priority=500 //end //created 4,Oct.,2012 by Abcdefgh //modified 30,Oct.,2012 by Abcdefgh //modified 16,Jan.,2016 by Abcdefgh //ファイル名の単純変換が不可能な為 function(){ println('faceboo4.dms start'); // 画像紹介ページをダウンロード var title = urlinfo.url.match(/photos\/[^\/]+\/([0-9]+)/)[0]; if (!title) { println('error---> downloadページURLが見つかりません'); exit(); } title2 = 'https://www.facebook.com/photo/download/?fbid=' + RegExp.$1; var url = new URL(title2); 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(/content=\"0;url=(https?:\/\/[^"?]+_[no][.](jpg|png)[?][^"]+)/)) { println('error---> オリジナルサイズの画像が見つかりません'); exit(); } var title= RegExp.$1.replace(/amp;/g,""); //ファイル名を抽出 if (!title.match(/([^\/?]+)[?][^"]+$/)) { println('error---> ファイル名が見つかりません'); exit(); } Dorothy.fileName = RegExp.$1; var url = new URL(title); urlinfo.url = url.url; headers.host = url.host; }