Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ firecrawl scrape https://firecrawl.dev https://firecrawl.dev/blog https://docs.f
| `--include-tags <tags>` | Only include specific HTML tags |
| `--exclude-tags <tags>` | Exclude specific HTML tags |
| `--max-age <milliseconds>` | Maximum age of cached content in milliseconds |
| `--lockdown` | Enable lockdown mode for the scrape |
| `-o, --output <path>` | Save output to file |
| `--json` | Output as JSON format |
| `--pretty` | Pretty print JSON output |
Expand Down
4 changes: 4 additions & 0 deletions src/commands/scrape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ export async function executeScrape(
scrapeParams.profile = options.profile;
}

if (options.lockdown) {
scrapeParams.lockdown = true;
}

// Execute scrape with timing - only wrap the scrape call in try-catch
const requestStartTime = Date.now();

Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ function createScrapeCommand(): Command {
'--no-save-changes',
'Load existing profile data without saving changes (default: saves changes)'
)
.option('--lockdown', 'Enable lockdown mode for the scrape', false)

.action(async (positionalArgs, options) => {
// Collect URLs from positional args and --url option
Expand Down Expand Up @@ -288,6 +289,7 @@ function createDownloadCommand(): Command {
'--languages <codes>',
'Comma-separated language codes for scraping (e.g., en,es)'
)
.option('--lockdown', 'Enable lockdown mode for the scrape', false)
.option('-y, --yes', 'Skip confirmation prompt', false)
.option(
'-k, --api-key <key>',
Expand Down
2 changes: 2 additions & 0 deletions src/types/scrape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ export interface ScrapeOptions {
name: string;
saveChanges?: boolean;
};
/** Enable lockdown mode for the scrape */
lockdown?: boolean;
}

export interface ScrapeResult {
Expand Down
1 change: 1 addition & 0 deletions src/utils/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,6 @@ export function parseScrapeOptions(options: any): ScrapeOptions {
location,
query: options.query,
profile,
lockdown: options.lockdown,
};
}
Loading