Skip to content

Commit

Permalink
news/api/article/medium: try to fix broken medium sync
Browse files Browse the repository at this point in the history
  • Loading branch information
vilhelmprytz authored May 22, 2024
1 parent afa02e7 commit e8a64f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion news/api/article/medium.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'<img[^>]+src="([^">]+)"', article.get("content")).group(1) if re.search(r'<img[^>]+src="([^">]+)"', article.get("content")) else "https://kthais.com/static/img/contact.bc4626749cb1.jpg",
"body": body,
}
)
Expand Down

0 comments on commit e8a64f5

Please sign in to comment.