Fixed the regex test

This commit is contained in:
rafaelsideguide 2024-06-25 18:24:01 -03:00
parent 749b0c05dc
commit 5f69fc7677

View File

@ -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]}`