Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

chore(api): export gdocs as HTML instead of PDF (#2652)

tomdca920257163
diff --git a/apps/api/src/scraper/scrapeURL/lib/rewriteUrl.ts b/apps/api/src/scraper/scrapeURL/lib/rewriteUrl.ts
index 9264c3238..1a56429f7 100644
--- a/apps/api/src/scraper/scrapeURL/lib/rewriteUrl.ts
+++ b/apps/api/src/scraper/scrapeURL/lib/rewriteUrl.ts
@@ -11,7 +11,7 @@ export function rewriteUrl(url: string): string | undefined {
}
const id = url.match(/\/document\/d\/([-\w]+)/)?.[1];
if (id) {
- return `https://docs.google.com/document/d/${id}/export?format=pdf`;
+ return `https://docs.google.com/document/d/${id}/export?format=html`;
}
} else if (
url.startsWith("https://docs.google.com/presentation/d/") ||
@@ -23,7 +23,7 @@ export function rewriteUrl(url: string): string | undefined {
}
const id = url.match(/\/presentation\/d\/([-\w]+)/)?.[1];
if (id) {
- return `https://docs.google.com/presentation/d/${id}/export?format=pdf`;
+ return `https://docs.google.com/presentation/d/${id}/export?format=html`;
}
} else if (
url.startsWith("https://drive.google.com/file/d/") ||