From b60ee30dba4374ccdb63e1ccf1e7a5aa2224be50 Mon Sep 17 00:00:00 2001 From: Gergo Moricz Date: Tue, 6 Aug 2024 18:00:56 +0200 Subject: [PATCH] fix(single_url): accept 500 --- apps/api/src/scraper/WebScraper/single_url.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/scraper/WebScraper/single_url.ts b/apps/api/src/scraper/WebScraper/single_url.ts index 4a44b23f..fc55037e 100644 --- a/apps/api/src/scraper/WebScraper/single_url.ts +++ b/apps/api/src/scraper/WebScraper/single_url.ts @@ -338,7 +338,7 @@ export async function scrapSingleUrl( Logger.debug(`⛏️ ${scraper}: Successfully scraped ${urlToScrap} with text length >= 100, breaking`); break; } - if (pageStatusCode && pageStatusCode == 404) { + if (pageStatusCode && (pageStatusCode == 404 || pageStatusCode == 500)) { Logger.debug(`⛏️ ${scraper}: Successfully scraped ${urlToScrap} with status code 404, breaking`); break; }