WebShot: Kein Cache von Bildern
This commit is contained in:
parent
f81e1fe9c2
commit
1a98fb1a15
@ -14,9 +14,10 @@ function webshot:action(msg, config, matches)
|
||||
local cache = '0' --cache=0 : never use cache, always download fresh screenshot || cache=1 : use image from cache only if is not older than 1 day etc...
|
||||
local url = matches[1]
|
||||
local img_url = 'http://api.screenshotmachine.com/?key='..api_key..'&dimension=1024x768&cacheLimit='..cache..'&url='..url
|
||||
local file = download_to_file(img_url, 'scrot.jpg')
|
||||
|
||||
utilities.send_typing(msg.chat.id, 'upload_photo')
|
||||
utilities.send_photo(msg.chat.id, img_url, nil, msg.message_id)
|
||||
utilities.send_photo(msg.chat.id, file, nil, msg.message_id)
|
||||
end
|
||||
|
||||
return webshot
|
Reference in New Issue
Block a user