mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Dont try to fetch content for some feed URLs like arvix which blocks fetches
This commit is contained in:
parent
90195f2d08
commit
c9b93a1180
1 changed files with 11 additions and 0 deletions
|
|
@ -53,6 +53,13 @@ export const isOldItem = (item: RssFeedItem, lastFetchedAt: number) => {
|
|||
)
|
||||
}
|
||||
|
||||
export const isContentFetchBlocked = (feedUrl: string) => {
|
||||
if (feedUrl.startsWith('https://arxiv.org/')) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const getThumbnail = (item: RssFeedItem) => {
|
||||
if (item['media:thumbnail']) {
|
||||
return item['media:thumbnail'].$.url
|
||||
|
|
@ -455,6 +462,10 @@ const processSubscription = async (
|
|||
continue
|
||||
}
|
||||
|
||||
if (isContentFetchBlocked(feedUrl)) {
|
||||
fetchContent = false
|
||||
}
|
||||
|
||||
const created = await createTask(
|
||||
userId,
|
||||
feedUrl,
|
||||
|
|
|
|||
Loading…
Reference in a new issue