From a632d1b76ce6f9f0ec148616626e2c505f974034 Mon Sep 17 00:00:00 2001 From: DasMoorhuhn Date: Sat, 4 Feb 2023 13:29:11 +0100 Subject: [PATCH 1/2] changed from slim to alpine --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5048f09..ecdf6af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-slim +FROM python:3.11-alpine WORKDIR /app From 67b39a42a97efe26a9292af9ab400b26627b62a5 Mon Sep 17 00:00:00 2001 From: DasMoorhuhn Date: Sat, 4 Feb 2023 14:09:04 +0100 Subject: [PATCH 2/2] finished xkcd --- src/addons.py | 24 ++++++++++++++++-------- src/main.py | 13 ++++++++----- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/addons.py b/src/addons.py index e6a9c21..9b44b51 100644 --- a/src/addons.py +++ b/src/addons.py @@ -22,16 +22,24 @@ class XKCD: def getRandomComic(self): response = requests.get(url=f"https://c.xkcd.com/random/comic") - with open(file="data/log/comic.html", mode="w") as file: - file.write(response.text) - file.close() - for line in response.text: + for line in response.text.split("\n"): if '