mirror of
https://github.com/rspamd/rspamd.git
synced 2024-09-13 23:56:50 +02:00
[Fix] Fix specific urls extraction
This commit is contained in:
parent
3f6efef9c2
commit
bf974d701d
@ -559,8 +559,10 @@ exports.extract_specific_urls = function(task, lim, need_emails, filter, prefix)
|
||||
-- We can get urls based on their eslds
|
||||
while lim > 0 do
|
||||
for _,lurls in pairs(eslds) do
|
||||
table.insert(res, table.remove(lurls))
|
||||
lim = lim - 1
|
||||
if #lurls > 0 then
|
||||
table.insert(res, table.remove(lurls))
|
||||
lim = lim - 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -571,8 +573,10 @@ exports.extract_specific_urls = function(task, lim, need_emails, filter, prefix)
|
||||
if ntlds <= lim then
|
||||
while lim > 0 do
|
||||
for _,lurls in pairs(tlds) do
|
||||
table.insert(res, table.remove(lurls))
|
||||
lim = lim - 1
|
||||
if #lurls > 0 then
|
||||
table.insert(res, table.remove(lurls))
|
||||
lim = lim - 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user