summaryrefslogtreecommitdiff
path: root/data-collection/components/videos.py
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2025-08-21 09:41:56 +0300
committerA Farzat <a@farzat.xyz>2025-08-21 09:41:56 +0300
commit69bcc9822c82ee6d726c98deafbdd0a20527a55a (patch)
treee51ee23b3da922e1baf7bd57f5c724e928c70d86 /data-collection/components/videos.py
parentb141aa29f28c4e4281415b97dac8fe548b128f9b (diff)
downloadcsca5028-69bcc9822c82ee6d726c98deafbdd0a20527a55a.tar.gz
csca5028-69bcc9822c82ee6d726c98deafbdd0a20527a55a.zip
Move components to root directory
Some components might be shared with other applications such as the data analyser later on.
Diffstat (limited to 'data-collection/components/videos.py')
-rw-r--r--data-collection/components/videos.py27
1 files changed, 0 insertions, 27 deletions
diff --git a/data-collection/components/videos.py b/data-collection/components/videos.py
deleted file mode 100644
index 5b2d644..0000000
--- a/data-collection/components/videos.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from typing import NamedTuple, Any, Self
-from datetime import datetime
-
-class VideoTuple(NamedTuple):
- id: str
- link: str
- title: str
- author: str
- author_channel: str
- published: datetime
- updated: datetime
- thumbnail: str
- summary: str
-
- @classmethod
- def from_rss_entry(cls, entry: Any) -> Self:
- return cls(
- id = entry.id,
- link = entry.link,
- title = entry.title,
- author = entry.author_detail.name,
- author_channel = entry.author_detail.href,
- published = datetime.fromisoformat(entry.published),
- updated = datetime.fromisoformat(entry.updated),
- thumbnail = entry.media_thumbnail[0]["url"],
- summary = entry.summary,
- )