Daniel Hecker: 3
Do not try to use empty string as url
Get all press releases until no next page exists
Store content in variable
3 files changed, 8 insertions(+), 3 deletions(-)
Directly printing the result of gsub somehow includes a number,
which might be the amount of matched substrings.
This does not happen, when the result is stored in a variable
before printing.
---
confs/koblenz-press-releases.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/confs/koblenz-press-releases.yml b/confs/koblenz-press-releases.yml
index e840730..1764202 100644
--- a/confs/koblenz-press-releases.yml+++ b/confs/koblenz-press-releases.yml
@@ -30,7 +30,8 @@ selectors:
--return error if the request was unsuccesfull
error(err)
end
- print(doc:find(".currentPressRelease"):html():gsub("\/pressezentrale","https://www.koblenz.de/pressezentrale"):gsub("https:\/\/www.koblenz.dehttps:\/\/www.koblenz.de", "https://www.koblenz.de"))+ content = doc:find(".currentPressRelease"):first():html():gsub("\/pressezentrale","https://www.koblenz.de/pressezentrale"):gsub("https:\/\/www.koblenz.dehttps:\/\/www.koblenz.de", "https://www.koblenz.de")+ print(content) link: |-
a = sel:find("a")
itemURL = "https://www.koblenz.de" .. a:attr("href")
--
2.34.1