環境対応 #596 » openimg-20130703.diff
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"
|
||
}
|
||
}
|
||
}
|