File tree Expand file tree Collapse file tree 4 files changed +41
-0
lines changed Expand file tree Collapse file tree 4 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM python:3.12-alpine
2
+
3
+ WORKDIR /code
4
+
5
+ COPY . .
6
+
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
+
9
+ WORKDIR /code/src
10
+
11
+ CMD [ "python" , "main.py" ]
Original file line number Diff line number Diff line change
1
+ # <PROJECT NAME >
2
+
3
+ ## Synopsis
4
+ Short explanation what the project is about.
5
+
6
+ ## Description
7
+ Longer explanation how to use and run the project and what it's for.
8
+
9
+ ## Parameter
10
+ If you have any parameters that can/should be used.
Original file line number Diff line number Diff line change
1
+ feedparser
Original file line number Diff line number Diff line change
1
+ import feedparser as fp
2
+
3
+ def main () -> None :
4
+ url = "https://www.svt.se/rss.xml"
5
+ feed = fp .parse (url )
6
+
7
+ print (f"Title: { feed .feed .title } " )
8
+ print (f"Description: { feed .feed .description } " )
9
+ print (f"Link: { feed .feed .link } " )
10
+
11
+ for entry in feed .entries :
12
+ print (f"Title: { entry .title } ({ entry .link } )" )
13
+ # print(f"Link: {entry.link}")
14
+ # print(f"Published: {entry.published}")
15
+ # print(f"Summary: {entry.summary}")
16
+ # print("\n")
17
+
18
+ if __name__ == "__main__" :
19
+ main ()
You can’t perform that action at this time.
0 commit comments