mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-14 09:05:52 +08:00
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:
commit
768a131b5c
@ -32,7 +32,7 @@ export async function handleCustomScraping(
|
|||||||
// Check for Google Drive PDF links in the raw HTML
|
// Check for Google Drive PDF links in the raw HTML
|
||||||
const googleDrivePdfPattern =
|
const googleDrivePdfPattern =
|
||||||
/https:\/\/drive\.google\.com\/file\/d\/([^\/]+)\/view/;
|
/https:\/\/drive\.google\.com\/file\/d\/([^\/]+)\/view/;
|
||||||
const googleDrivePdfLink = text.match(googleDrivePdfPattern);
|
const googleDrivePdfLink = url.match(googleDrivePdfPattern);
|
||||||
if (googleDrivePdfLink) {
|
if (googleDrivePdfLink) {
|
||||||
console.log(
|
console.log(
|
||||||
`Google Drive PDF link detected for ${url}: ${googleDrivePdfLink[0]}`
|
`Google Drive PDF link detected for ${url}: ${googleDrivePdfLink[0]}`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user