if params.prefix then
cache_key = params.prefix
else
- cache_key = string.format('sp_urls_%d%s', params.limit,
- tostring(params.need_emails or false))
+ cache_key = string.format('sp_urls_%d%s%s', params.limit,
+ tostring(params.need_emails or false),
+ tostring(params.need_images or false))
end
local cached = params.task:cache_get(cache_key)
end
end
+ if flags.image then
+ if not params.need_images then
+ -- Ignore url
+ return
+ else
+ -- Penalise images in urls
+ priority = 0
+ end
+ end
+
local esld = u:get_tld()
local str_hash = tostring(u)
- - filter <callback> (default = nil)
- - prefix <string> cache prefix (default = nil)
- - ignore_redirected <bool> (default = false)
+- - need_images <bool> (default = false)
-- }
-- Apply heuristic in extracting of urls from task, this function
-- tries its best to extract specific number of urls from a task based on
limit = 9999,
esld_limit = 9999,
need_emails = false,
+ need_images = false,
filter = nil,
prefix = nil,
ignore_ip = false,