feat: ingest site videos through raw pipeline
This commit is contained in:
@@ -4,12 +4,14 @@ from app import parse_rss
|
||||
def test_parse_rss() -> None:
|
||||
xml = """<rss><channel><item><guid>1</guid><title>Title</title>
|
||||
<link>https://example.test/1</link>
|
||||
<description><p>Body</p><img src="https://example.test/1.jpg"></description>
|
||||
<description><p>Body</p><img src="/1.jpg">
|
||||
<iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ?feature=oembed"></iframe></description>
|
||||
<pubDate>Mon, 10 Aug 2026 10:00:00 +0000</pubDate></item></channel></rss>"""
|
||||
item = parse_rss(xml, 20)[0]
|
||||
assert item.external_id == "1"
|
||||
assert item.text == "Body"
|
||||
assert item.media[0]["url"] == "https://example.test/1.jpg"
|
||||
assert item.media[1] == {"type": "video", "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user