Fix für Link-Name
This commit is contained in:
parent
d8b0a97c9f
commit
ceb13c9733
@ -327,12 +327,19 @@ function rss:cron()
|
|||||||
local text = '' -- Send one message per feed with the latest entries
|
local text = '' -- Send one message per feed with the latest entries
|
||||||
for k2, v2 in pairs(newentr) do
|
for k2, v2 in pairs(newentr) do
|
||||||
local title = unescape(v2.title) or 'Kein Titel'
|
local title = unescape(v2.title) or 'Kein Titel'
|
||||||
|
|
||||||
local link = v2.link or v2.id or 'Kein Link'
|
local link = v2.link or v2.id or 'Kein Link'
|
||||||
local link_name = link:match('//([^/]+)')
|
if string.match(link, '//') then
|
||||||
local link_name = link_name:gsub('^www%.', '')
|
link_name = link:match('//([^/]+)')
|
||||||
|
else
|
||||||
|
link_name = link
|
||||||
|
end
|
||||||
if link_name == 'feedproxy.google.com' then
|
if link_name == 'feedproxy.google.com' then
|
||||||
link_name = link:match('feedproxy%.google%.com/~r/(.+)/~')
|
link_name = link:match('feedproxy%.google%.com/~r/(.+)/~')
|
||||||
end
|
end
|
||||||
|
local link_name = link_name:gsub('^www%.', '')
|
||||||
|
local link_name = link_name:gsub('^www1%.', '')
|
||||||
|
|
||||||
if v2.content then
|
if v2.content then
|
||||||
content = v2.content:gsub("%b<>", "")
|
content = v2.content:gsub("%b<>", "")
|
||||||
if string.len(v2.content) > 250 then
|
if string.len(v2.content) > 250 then
|
||||||
|
Reference in New Issue
Block a user