From 5f69fc76771e1058780e84374db5a2134cdc6712 Mon Sep 17 00:00:00 2001 From: rafaelsideguide <150964962+rafaelsideguide@users.noreply.github.com> Date: Tue, 25 Jun 2024 18:24:01 -0300 Subject: [PATCH] Fixed the regex test --- apps/api/src/scraper/WebScraper/custom/handleCustomScraping.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/scraper/WebScraper/custom/handleCustomScraping.ts b/apps/api/src/scraper/WebScraper/custom/handleCustomScraping.ts index 081150b..d78d815 100644 --- a/apps/api/src/scraper/WebScraper/custom/handleCustomScraping.ts +++ b/apps/api/src/scraper/WebScraper/custom/handleCustomScraping.ts @@ -32,7 +32,7 @@ export async function handleCustomScraping( // Check for Google Drive PDF links in the raw HTML const googleDrivePdfPattern = /https:\/\/drive\.google\.com\/file\/d\/([^\/]+)\/view/; - const googleDrivePdfLink = text.match(googleDrivePdfPattern); + const googleDrivePdfLink = url.match(googleDrivePdfPattern); if (googleDrivePdfLink) { console.log( `Google Drive PDF link detected for ${url}: ${googleDrivePdfLink[0]}`