Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions apps/web/client/src/server/api/routers/project/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,16 @@ export const projectRouter = createTRPCRouter({
const url = getSandboxPreviewUrl(branch.sandboxId, port);
const app = new FirecrawlApp({ apiKey: env.FIRECRAWL_API_KEY });

// Optional: Add actions to click the button for CSB free tier
// const _csbFreeActions = [{
// type: 'click',
// selector: '#btn-answer-yes',
// }];
// CSB free tier: auto-accept trust interstitial
const csbFreeActions = [{
type: 'click' as const,
selector: '#btn-answer-yes',
}];
const result = await app.scrapeUrl(url, {
formats: ['screenshot'],
onlyMainContent: true,
timeout: 10000,
actions: csbFreeActions,
});

if (!result.success) {
Expand Down