Skip to content

Commit 524ee2f

Browse files
authored
Merge pull request #7 from ScrapeGraphAI/feat/remove-render-heavy-js
feat: remove --render-js option from all commands
2 parents 28bdde0 + 4dedd12 commit 524ee2f

8 files changed

Lines changed: 9 additions & 28 deletions

File tree

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Extract structured data from any URL using AI. [docs](https://docs.scrapegraphai
105105
```bash
106106
just-scrape smart-scraper <url> -p <prompt> # Extract data with AI
107107
just-scrape smart-scraper <url> -p <prompt> --schema <json> # Enforce output schema
108-
just-scrape smart-scraper <url> -p <prompt> --scrolls <n> # Infinite scroll (0-100)
108+
just-scrape smart-scraper <url> -p <prompt> --scrolls <n> # Infinite scroll (0-100)
109109
just-scrape smart-scraper <url> -p <prompt> --pages <n> # Multi-page (1-100)
110110
just-scrape smart-scraper <url> -p <prompt> --stealth # Anti-bot bypass (+4 credits)
111111
just-scrape smart-scraper <url> -p <prompt> --cookies <json> --headers <json>
@@ -125,7 +125,7 @@ just-scrape smart-scraper https://news.example.com -p "Get all article headlines
125125

126126
# Scrape a JS-heavy SPA behind anti-bot protection
127127
just-scrape smart-scraper https://app.example.com/dashboard -p "Extract user stats" \
128-
--render-js --stealth
128+
--stealth
129129
```
130130

131131
## Search Scraper
@@ -164,7 +164,6 @@ Convert any webpage to clean markdown. [docs](https://docs.scrapegraphai.com/ser
164164

165165
```bash
166166
just-scrape markdownify <url> # Convert to markdown
167-
just-scrape markdownify <url> --render-js # JS rendering (+1 credit)
168167
just-scrape markdownify <url> --stealth # Anti-bot bypass (+4 credits)
169168
just-scrape markdownify <url> --headers <json> # Custom headers
170169
```
@@ -176,7 +175,7 @@ just-scrape markdownify <url> --headers <json> # Custom headers
176175
just-scrape markdownify https://blog.example.com/my-article
177176

178177
# Convert a JS-rendered page behind Cloudflare
179-
just-scrape markdownify https://protected.example.com --render-js --stealth
178+
just-scrape markdownify https://protected.example.com --stealth
180179

181180
# Pipe markdown to a file
182181
just-scrape markdownify https://docs.example.com/api --json | jq -r '.result' > api-docs.md
@@ -196,7 +195,7 @@ just-scrape crawl <url> --no-extraction --max-pages <n> # Markdown only (2 cr
196195
just-scrape crawl <url> -p <prompt> --schema <json> # Enforce output schema
197196
just-scrape crawl <url> -p <prompt> --rules <json> # Crawl rules (include_paths, same_domain)
198197
just-scrape crawl <url> -p <prompt> --no-sitemap # Skip sitemap discovery
199-
just-scrape crawl <url> -p <prompt> --render-js --stealth # JS + anti-bot
198+
just-scrape crawl <url> -p <prompt> --stealth # Anti-bot bypass
200199
```
201200

202201
### Examples
@@ -242,7 +241,6 @@ Get raw HTML content from a URL. [docs](https://docs.scrapegraphai.com/services/
242241

243242
```bash
244243
just-scrape scrape <url> # Raw HTML
245-
just-scrape scrape <url> --render-js # JS rendering (+1 credit)
246244
just-scrape scrape <url> --stealth # Anti-bot bypass (+4 credits)
247245
just-scrape scrape <url> --branding # Extract branding (+2 credits)
248246
just-scrape scrape <url> --country-code <iso> # Geo-targeting

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "just-scrape",
3-
"version": "0.1.4",
3+
"version": "0.1.6",
44
"description": "ScrapeGraph AI CLI tool",
55
"type": "module",
66
"main": "dist/cli.mjs",

skills/just-scrape/SKILL.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ API key resolution order: `SGAI_API_KEY` env var → `.env` file → `~/.scrapeg
4747
All commands support `--json` for machine-readable output (suppresses banner, spinners, prompts).
4848

4949
Scraping commands share these optional flags:
50-
- `--render-js` — render JavaScript (+1 credit)
5150
- `--stealth` — bypass anti-bot detection (+4 credits)
5251
- `--headers <json>` — custom HTTP headers as JSON string
5352
- `--schema <json>` — enforce output JSON schema
@@ -63,7 +62,6 @@ just-scrape smart-scraper <url> -p <prompt>
6362
just-scrape smart-scraper <url> -p <prompt> --schema <json>
6463
just-scrape smart-scraper <url> -p <prompt> --scrolls <n> # infinite scroll (0-100)
6564
just-scrape smart-scraper <url> -p <prompt> --pages <n> # multi-page (1-100)
66-
just-scrape smart-scraper <url> -p <prompt> --render-js # JS rendering (+1 credit)
6765
just-scrape smart-scraper <url> -p <prompt> --stealth # anti-bot (+4 credits)
6866
just-scrape smart-scraper <url> -p <prompt> --cookies <json> --headers <json>
6967
just-scrape smart-scraper <url> -p <prompt> --plain-text
@@ -80,7 +78,7 @@ just-scrape smart-scraper https://news.example.com -p "Get headlines and dates"
8078

8179
# JS-heavy SPA behind anti-bot
8280
just-scrape smart-scraper https://app.example.com/dashboard -p "Extract user stats" \
83-
--render-js --stealth
81+
--stealth
8482
```
8583

8684
### Search Scraper
@@ -113,14 +111,13 @@ Convert any webpage to clean markdown.
113111

114112
```bash
115113
just-scrape markdownify <url>
116-
just-scrape markdownify <url> --render-js # +1 credit
117114
just-scrape markdownify <url> --stealth # +4 credits
118115
just-scrape markdownify <url> --headers <json>
119116
```
120117

121118
```bash
122119
just-scrape markdownify https://blog.example.com/my-article
123-
just-scrape markdownify https://protected.example.com --render-js --stealth
120+
just-scrape markdownify https://protected.example.com --stealth
124121
just-scrape markdownify https://docs.example.com/api --json | jq -r '.result' > api-docs.md
125122
```
126123

@@ -136,7 +133,7 @@ just-scrape crawl <url> --no-extraction --max-pages <n> # markdown only (2 cre
136133
just-scrape crawl <url> -p <prompt> --schema <json>
137134
just-scrape crawl <url> -p <prompt> --rules <json> # include_paths, same_domain
138135
just-scrape crawl <url> -p <prompt> --no-sitemap
139-
just-scrape crawl <url> -p <prompt> --render-js --stealth
136+
just-scrape crawl <url> -p <prompt> --stealth
140137
```
141138

142139
```bash
@@ -157,7 +154,6 @@ Get raw HTML content from a URL.
157154

158155
```bash
159156
just-scrape scrape <url>
160-
just-scrape scrape <url> --render-js # +1 credit
161157
just-scrape scrape <url> --stealth # +4 credits
162158
just-scrape scrape <url> --branding # extract logos/colors/fonts (+2 credits)
163159
just-scrape scrape <url> --country-code <iso>
@@ -269,7 +265,7 @@ done
269265

270266
```bash
271267
# JS-heavy SPA behind Cloudflare
272-
just-scrape smart-scraper https://protected.example.com -p "Extract data" --render-js --stealth
268+
just-scrape smart-scraper https://protected.example.com -p "Extract data" --stealth
273269

274270
# With custom cookies/headers
275271
just-scrape smart-scraper https://example.com -p "Extract data" \
@@ -280,7 +276,6 @@ just-scrape smart-scraper https://example.com -p "Extract data" \
280276

281277
| Feature | Extra Credits |
282278
|---|---|
283-
| `--render-js` | +1 per page |
284279
| `--stealth` | +4 per request |
285280
| `--branding` (scrape only) | +2 |
286281
| `search-scraper` extraction | 10 per request |

src/commands/crawl.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export default defineCommand({
2828
schema: { type: "string", description: "Output JSON schema (as JSON string)" },
2929
rules: { type: "string", description: "Crawl rules as JSON object string" },
3030
"no-sitemap": { type: "boolean", description: "Disable sitemap-based URL discovery" },
31-
"render-js": { type: "boolean", description: "Enable heavy JS rendering (+1 credit/page)" },
3231
stealth: { type: "boolean", description: "Bypass bot detection (+4 credits)" },
3332
json: { type: "boolean", description: "Output raw JSON (pipeable)" },
3433
},
@@ -46,7 +45,6 @@ export default defineCommand({
4645
if (args.schema) params.schema = JSON.parse(args.schema);
4746
if (args.rules) params.rules = JSON.parse(args.rules);
4847
if (args["no-sitemap"]) params.sitemap = false;
49-
if (args["render-js"]) params.render_heavy_js = true;
5048
if (args.stealth) params.stealth = true;
5149

5250
out.start("Crawling");

src/commands/markdownify.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export default defineCommand({
1414
description: "Website URL to convert",
1515
required: true,
1616
},
17-
"render-js": { type: "boolean", description: "Enable heavy JS rendering (+1 credit)" },
1817
stealth: { type: "boolean", description: "Bypass bot detection (+4 credits)" },
1918
headers: { type: "string", description: "Custom headers as JSON object string" },
2019
json: { type: "boolean", description: "Output raw JSON (pipeable)" },
@@ -28,7 +27,6 @@ export default defineCommand({
2827
website_url: args.url,
2928
};
3029

31-
if (args["render-js"]) params.render_heavy_js = true;
3230
if (args.stealth) params.stealth = true;
3331
if (args.headers) params.headers = JSON.parse(args.headers);
3432

src/commands/scrape.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export default defineCommand({
1414
description: "Website URL to scrape",
1515
required: true,
1616
},
17-
"render-js": { type: "boolean", description: "Enable heavy JS rendering (+1 credit)" },
1817
stealth: { type: "boolean", description: "Bypass bot detection (+4 credits)" },
1918
branding: { type: "boolean", description: "Extract branding info (+2 credits)" },
2019
"country-code": { type: "string", description: "ISO country code for geo-targeting" },
@@ -27,7 +26,6 @@ export default defineCommand({
2726

2827
const params: scrapegraphai.ScrapeParams = { website_url: args.url };
2928

30-
if (args["render-js"]) params.render_heavy_js = true;
3129
if (args.stealth) params.stealth = true;
3230
if (args.branding) params.branding = true;
3331
if (args["country-code"]) params.country_code = args["country-code"];

src/commands/smart-scraper.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export default defineCommand({
2323
schema: { type: "string", description: "Output JSON schema (as JSON string)" },
2424
scrolls: { type: "string", description: "Number of infinite scrolls (0-100)" },
2525
pages: { type: "string", description: "Total pages to scrape (1-100)" },
26-
"render-js": { type: "boolean", description: "Enable heavy JS rendering (+1 credit)" },
2726
stealth: { type: "boolean", description: "Bypass bot detection (+4 credits)" },
2827
cookies: { type: "string", description: "Cookies as JSON object string" },
2928
headers: { type: "string", description: "Custom headers as JSON object string" },
@@ -43,7 +42,6 @@ export default defineCommand({
4342
if (args.schema) params.output_schema = JSON.parse(args.schema);
4443
if (args.scrolls) params.number_of_scrolls = Number(args.scrolls);
4544
if (args.pages) params.total_pages = Number(args.pages);
46-
if (args["render-js"]) params.render_heavy_js = true;
4745
if (args.stealth) params.stealth = true;
4846
if (args.cookies) params.cookies = JSON.parse(args.cookies);
4947
if (args.headers) params.headers = JSON.parse(args.headers);

src/lib/schemas.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export const SmartScraperSchema = z.object({
1111
output_schema: jsonObject.optional(),
1212
number_of_scrolls: z.number().int().min(0).max(100).optional(),
1313
total_pages: z.number().int().min(1).max(100).optional(),
14-
render_heavy_js: z.boolean().optional(),
1514
stealth: z.boolean().optional(),
1615
cookies: jsonStringObject.optional(),
1716
headers: jsonStringObject.optional(),
@@ -31,7 +30,6 @@ export const SearchScraperSchema = z.object({
3130

3231
export const MarkdownifySchema = z.object({
3332
website_url: z.string().url(),
34-
render_heavy_js: z.boolean().optional(),
3533
stealth: z.boolean().optional(),
3634
headers: jsonStringObject.optional(),
3735
webhook_url: z.string().url().optional(),
@@ -46,7 +44,6 @@ export const CrawlSchema = z.object({
4644
schema: jsonObject.optional(),
4745
rules: jsonObject.optional(),
4846
sitemap: z.boolean().optional(),
49-
render_heavy_js: z.boolean().optional(),
5047
stealth: z.boolean().optional(),
5148
webhook_url: z.string().url().optional(),
5249
});
@@ -62,7 +59,6 @@ export const SitemapSchema = z.object({
6259

6360
export const ScrapeSchema = z.object({
6461
website_url: z.string().url(),
65-
render_heavy_js: z.boolean().optional(),
6662
stealth: z.boolean().optional(),
6763
branding: z.boolean().optional(),
6864
country_code: z.string().optional(),

0 commit comments

Comments
 (0)