diff --git a/internet.lua b/internet.lua index c707c22..75d6c96 100644 --- a/internet.lua +++ b/internet.lua @@ -287,6 +287,7 @@ function internet.download_headers (url) url = url, method = 'HEAD' } + print(_, code, headers, status) -- return headers end diff --git a/memes.lua b/memes.lua index c80847b..c2c8938 100644 --- a/memes.lua +++ b/memes.lua @@ -544,6 +544,10 @@ local curb = require 'curb_your_enthusiasm' local function is_image_link (str) print(str) + if str:match '%.png$' or str:match '%.gif$' or str:match '%.jpg$' then + return true + end + -- if type(str) ~= 'string' then return false end if not str:match '^%a+://.+$' then return false end local headers = internet.download_headers(str)