We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 541d8be + a521803 commit 448789cCopy full SHA for 448789c
src/lib/api/fetchRSS.ts
@@ -42,10 +42,10 @@ export const fetchRSS = async (xmlUrl: string | string[]) => {
42
// Map to RSSItem object
43
.map((item) => {
44
const getImgSrc = () => {
45
- if (url.includes("medium.com/feed/"))
46
- return item["content:encoded"]?.[0].match(
+ if (item["content:encoded"])
+ return item["content:encoded"][0].match(
47
/https?:\/\/[^"]*?\.(jpe?g|png|webp)/g
48
- )
+ )?.[0]
49
if (item.enclosure) return item.enclosure[0].$.url
50
if (item["media:content"]) return item["media:content"][0].$.url
51
return channelImage
0 commit comments