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
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,14 @@ Four ways to provide it (checked in order):
3. **Config file**: `~/.scrapegraphai/config.json`
4. **Interactive prompt**: the CLI asks and saves to config

```bash
export JUST_SCRAPE_TIMEOUT_S=300 # Request/polling timeout in seconds (default: 120)
JUST_SCRAPE_DEBUG=1 just-scrape ... # Debug logging to stderr
```
### Environment Variables

| Variable | Description | Default |
|---|---|---|
| `SGAI_API_KEY` | ScrapeGraph API key | — |
| `JUST_SCRAPE_API_URL` | Override API base URL | `https://api.scrapegraphai.com/v1` |
| `JUST_SCRAPE_TIMEOUT_S` | Request/polling timeout in seconds | `120` |
| `JUST_SCRAPE_DEBUG` | Set to `1` to enable debug logging to stderr | `0` |

## JSON Mode (`--json`)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "just-scrape",
"version": "0.1.7",
"version": "0.1.8",
"description": "ScrapeGraph AI CLI tool",
"type": "module",
"main": "dist/cli.mjs",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/scrapegraphai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export type {
SmartScraperParams,
} from "../types/index.js";

const BASE_URL = "https://api.scrapegraphai.com/v1";
const BASE_URL = process.env.JUST_SCRAPE_API_URL || "https://api.scrapegraphai.com/v1";
const POLL_INTERVAL_MS = 3000;

function debug(label: string, data?: unknown) {
Expand Down
5 changes: 4 additions & 1 deletion src/utils/banner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const BANNER = [
"╚═╝╚═╝╚═╝ ╩ ╚═╝╚═╝╩╚═╩ ╩╩ ╚═╝",
];

const TAGLINE = " made with ♥ from scrapegraphai team";
const TAGLINE = "made with ♥ from scrapegraphai team";

const BANNER_COLOR = "#bd93f9";

Expand All @@ -30,5 +30,8 @@ export function showBanner() {
console.log(text);
console.log(chalk.hex(BANNER_COLOR)(TAGLINE));
console.log(chalk.hex(BANNER_COLOR)(`v${getVersion()}`));
if (process.env.JUST_SCRAPE_API_URL) {
console.log(chalk.yellow(`→ Custom API: ${process.env.JUST_SCRAPE_API_URL}`));
}
console.log();
}