Kommentar in AP entfernt, da ich jetzt weiß wie's geht... aber leider funktioniert es mit den langen IDs nicht T_T

This commit is contained in:
Andreas Bielawski 2016-09-13 00:11:53 +02:00
parent 94328a790f
commit 426aa35962

View File

@ -11,9 +11,7 @@ function ap:get_article(article)
local headline = res:match('<span class%=\"headline entry%-title\">(.-)</span>') local headline = res:match('<span class%=\"headline entry%-title\">(.-)</span>')
if not headline then return end if not headline then return end
-- TODO: How to match all occurences? AP uses the same class for all paragraphs
-- but string.match only returns the first one oO
local article = unescape(utilities.trim(res:match('<p class%=\"ap%-story%-p\">(.-)</p>'))) local article = unescape(utilities.trim(res:match('<p class%=\"ap%-story%-p\">(.-)</p>')))
local pic_url = res:match('<img src%=\"(/photos/.-)" alt%=\"AP Photo\"') local pic_url = res:match('<img src%=\"(/photos/.-)" alt%=\"AP Photo\"')