Conversation
`firecrawl scrape` with several URLs saves each page to `.firecrawl/<host>-<path>.md`. The name drops the query string and turns `/` into `-`, so `list?page=1` and `list?page=2`, or `/a/b` and `/a-b`, wrote to the same file. The later page overwrote the earlier one while the run still reported every URL as saved. Filenames are now picked up front in URL order, and a name already used in the batch gets a `-2`, `-3`, ... suffix. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Shadow auto-approve: would not auto-approve because issues were found.
Fix all with cubic | Re-trigger cubic
…ively A suffixed name no longer takes the plain name of another URL in the batch (/a?x=1, /a?x=2, /a-2), and /Foo and /foo no longer share a file on case-insensitive file systems. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Fixes multi-URL scrape losing pages when URLs collide on output filenames by assigning unique suffixed names up front, preserving plain names for non-colliding URLs, with tests covering colliding and edge cases.
Re-trigger cubic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's wrong
firecrawl scrapewith several URLs saves each page to.firecrawl/<host>-<path>.md(urlToFilename). The name drops the query string and turns/into-, so different URLs can map to the same file:The run reports all four pages as saved, but only two files exist. Whichever request finished last overwrote the other page. Paginated URLs such as
?page=Nor?id=Nare a common reason to pass several URLs to one command, and they always hit this.Fix
Filenames are chosen before the requests start, in the order the URLs were given. If a name is already used in the batch, the later URL gets
-2,-3, and so on (example.com-list-2.md). URLs that don't collide keep the same names as before, so existing scripts that read.firecrawl/<host>-<path>.mdare unaffected.Tests
New
src/__tests__/commands/multi-scrape-filenames.test.ts(mocked client andfs):main, where only two files are written.pnpm run format:check,pnpm run type-check,pnpm run buildandpnpm test(642 tests) pass. Under heavy local load, some subprocess tests inalexandria-beta.test.tstimed out on bothmainand this branch. They pass with--maxWorkers=4.This PR was prepared with an AI coding agent (Claude). I reproduced the bug and checked the fix and tests before opening it.
Summary by cubic
Fixes
firecrawl scrapesilently losing pages when URLs bundled in one run collide on their output filename. URLs that differ only in their query string (?page=1vs?page=2) or in/versus-(/a/bvs/a-b) mapped to the same.firecrawl/<host>-<path>.mdfile, and the last request to finish overwrote the rest while the run still reported every URL as saved.-2,-3, ... suffix for names already used in the batch. Plain names are reserved first so a suffixed name can't take another URL's plain name, and names are compared case-insensitively to match macOS and Windows..firecrawl/<host>-<path>.mdare unaffected.Written for commit db4636e. Summary will update on new commits.