プロジェクト

全般

プロフィール

環境対応 #596 » openimg-20130703.diff

hycon miyagi, 2013-07-03 13:02

差分を表示:

core/plugin/openimg/openimg.rb
t = fetch(url)
/^(http:\/\/[^\/]+\/)post(\/\d+)/ =~ t
if $~
imgurlresolver($1 + "image" + $2, 'id' => 'image')
imgurlresolver($1 + "image" + $2, 'id' => 'content-image')
else
warn "たんぶらの記事ページじゃないっぽい"
nil
core/plugin/openimg/pattern_file.json
"Tumblr image": {
"url": "^http://[-0-9a-z]+\\.tumblr\\.com/image/\\d+",
"attribute": {
"id": "image"
"id": "content-image"
}
},
"はてなフォトライフ": {
......
"attribute": {
"class": "photo_frame kadomaru"
}
},
"フォト蔵": {
"url": "^http://photozou\\.jp/photo/show/\\d+/\\d+",
"attribute": {
"itemprop": "image"
}
}
}
    (1-1/1)