Merge pull request #318 from mendableai/bug/fix-custom-scrape-pdf-google-drive

[Bug] Fixed the regex test for google drive pdf files
This commit is contained in:
Nicolas 2024-06-25 18:27:11 -03:00 committed by GitHub
commit 768a131b5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

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