BuilderIO / BuilderIO/gpt-crawler

Use new `crawler.exportData` helper

Open
#64 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
22.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

Hello from the crawlee team!

Just a small suggestion, I was taking a peek at the code and saw you do this to create a data bundle at the end.

https://github.com/BuilderIO/gpt-crawler/blob/27b65d36d42660ad925ec36c399f717b8f359726/src/core.ts#L115-L129

We recently added a new helper that does exactly the same:

https://crawlee.dev/api/basic-crawler/class/BasicCrawler#exportData

So you could replace the whole function with a simple crawler.exportData(config.outputFileName) call, and it will support both JSON and CSV automatically (based on the file extension).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open src/core.ts at lines 115-129 and compare the existing data-bundle logic with Crawlee's BasicCrawler exportData helper. Replace that function with the suggested call using config.outputFileName, then verify that both JSON and CSV output still work based on the file extension.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.