BuilderIO / BuilderIO/gpt-crawler

Script Not Crawling Subdirectories During Website Scraping

Open
#166 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
22.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

I have written a script to scrape a website. Initially, it includes directories, and inside each directory, there are subdirectories. The problem is that the program is not crawling through the subdirectories. The website I am going to scrape is:

https://t24-documentation.finductive.com/Solutions/T24_Transact/Accounts/

![image](https://github.com/BuilderIO/gpt-crawler/assets/16856026/60b4d3da-a7dc-4e3c-a0e1-81417019d1d5)

The script I have written:

```
import { Config } from "./src/config";

const url = "https://t24-documentation.finductive.com/Solutions/T24_Transact/Accounts/";
const match = url + "/**";
const fileName = "output";
export const defaultConfig: Config = {
url,
match,
resourceExclusions: [
'png', 'jpg', 'jpeg', 'gif', 'svg', 'css', 'js', 'ico', 'woff', 'woff2', 'ttf', 'eot', 'otf', 'mp4', 'mp3', 'webm', 'ogg', 'wav', 'flac', 'aac', 'zip', 'tar', 'gz', 'rar', '7z', 'exe', 'dmg', 'apk', 'csv', 'xls', 'xlsx', 'doc', 'docx', 'pdf', 'epub', 'iso', 'bin', 'ppt', 'pptx', 'odt', 'avi', 'mkv', 'xml', 'json', 'yml', 'yaml', 'rss', 'atom', 'swf', 'txt', 'dart', 'webp', 'bmp', 'tif', 'psd', 'ai', 'indd', 'eps', 'ps', 'zipx', 'srt', 'wasm', 'm4v', 'm4a', 'webp', 'weba', 'm4b', 'opus', 'ogv', 'ogm', 'oga', 'spx', 'ogx', 'flv', '3gp', '3g2', 'jxr', 'wdp', 'jng', 'hief', 'avif', 'apng', 'avifs', 'heif', 'heic', 'cur', 'ico', 'ani', 'jp2', 'jpm', 'jpx', 'mj2', 'wmv', 'wma', 'aac', 'tif', 'tiff', 'mpg', 'mpeg', 'mov', 'avi', 'wmv', 'flv', 'swf', 'mkv', 'm4v', 'm4p', 'm4b', 'm4r', 'm4a', 'mp3', 'wav', 'wma', 'ogg', 'oga', 'webm', '3gp', '3g2', 'flac', 'spx', 'amr', 'mid', 'midi', 'mka', 'dts', 'ac3', 'eac3', 'weba', 'm3u', 'm3u8', 'ts', 'wpl', 'pls', 'vob', 'ifo', 'bup', 'svcd', 'drc', 'dsm', 'dsv', 'dsa', 'dss', 'vivo', 'ivf', 'dvd', 'fli', 'flc', 'flic', 'mng', 'asf', 'm2v', 'asx', 'ram', 'ra', 'rm', 'rpm', 'roq', 'smi', 'smil', 'wmf', 'wmz', 'wmd', 'wvx', 'wmx', 'movie', 'wri', 'ins', 'isp', 'acsm', 'djvu', 'fb2', 'xps', 'oxps', 'ps', 'eps', 'ai', 'prn', 'svg', 'dwg', 'dxf', 'ttf', 'fnt', 'fon', 'otf', 'cab'
],
maxPagesToCrawl: 1000000, // High number to ensure broad crawl
outputFileName: fileName + ".json",
maxFileSize: 5, // Max file size in MB
maxTokens: 999000000, // Very high limit for tokens
};
```

Config:
![image](https://github.com/BuilderIO/gpt-crawler/assets/16856026/1adc7900-c8cc-4a1a-a4a4-d8c305b2b5aa)

Output:
![image](https://github.com/BuilderIO/gpt-crawler/assets/16856026/a1aa7509-d1ea-4aeb-aaef-c805819aea31)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the configuration imported from src/config and reproduce the crawl using the provided T24 documentation URL and match pattern. Trace how the crawler handles links beneath the Accounts directory and verify the output includes pages from its subdirectories.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.