From e8a64f5a4158080b8ad3a1316117db579f811147 Mon Sep 17 00:00:00 2001 From: Vilhelm Prytz Date: Wed, 22 May 2024 17:52:20 +0200 Subject: [PATCH] news/api/article/medium: try to fix broken medium sync --- news/api/article/medium.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/api/article/medium.py b/news/api/article/medium.py index 894937c..49baac8 100644 --- a/news/api/article/medium.py +++ b/news/api/article/medium.py @@ -38,7 +38,7 @@ def get_medium_articles() -> Optional[List[Dict]]: "title": article.get("title").strip(), "author": article.get("author").strip(), "external_url": article.get("guid"), - "image": article.get("thumbnail"), + "image": re.search(r']+src="([^">]+)"', article.get("content")).group(1) if re.search(r']+src="([^">]+)"', article.get("content")) else "https://kthais.com/static/img/contact.bc4626749cb1.jpg", "body": body, } )