Heise: Fix, wenn kein Teaser-Text vorhanden

This commit is contained in:
Andreas Bielawski 2016-06-26 01:01:15 +02:00
parent 96c0328423
commit 195be96423

View File

@ -17,11 +17,15 @@ function heise:get_heise_article(article)
if code ~= 200 then return "HTTP-Fehler" end if code ~= 200 then return "HTTP-Fehler" end
local title = data.h2 local title = data.h2
local teaser = data.strong if data.strong then
teaser = '\n'..data.strong
else
teaser = ''
end
if data.img then if data.img then
image_url = 'https:'..data.img.src image_url = 'https:'..data.img.src
end end
local text = '*'..title..'*\n'..teaser local text = '*'..title..'*'..teaser
if data.img then if data.img then
return text, image_url return text, image_url