# bdy scrape

## Usage

```bash
bdy scrape [options] [url]
```

## Arguments

| **Argument** | **Description** |
| :--- | :--- |
| `url` | URL to scrape (optional; defaults to scrape suite URL) (optional) |

## Options

| **Option** | **Description** |
| :--- | :--- |
| `--follow` | Scrape all subviews of the page (default: false) |
| `--respectRobots` | Respect robots.txt |
| `--outputType <type>` | Output type (choices: "jpeg", "png", "md", "html") |
| `--outputTypes <json>` | Output types as JSON array (e.g., --outputTypes '[{"type":"md","selector":{"type":"CSS","value":".main"}},{"type":"jpeg","quality":80,"fullPage":true}]') |
| `--quality <quality>` | Quality of the png output (default: "100") |
| `--fullPage` | Scrape full page (default: false) |
| `--cssSelector <selector>` | CSS selector to scrape |
| `--xpathSelector <selector>` | XPath selector to scrape |
| `--colorScheme <scheme>` | Color scheme to use (LIGHT, DARK, LIGHT_AND_DARK) (choices: "LIGHT", "DARK", "LIGHT_AND_DARK") |
| `--browsers <browsers>` | Browsers to use (comma separated: chrome,firefox,safari) |
| `--devices <devices>` | Devices definition as JSON array (e.g., --devices '[{"viewport":"1920x1080","screen":"1920x1080","devicePixelRatio":1,"isMobile":false}]') |
| `--waitFor <waitFors...>` | Wait for elements to appear before taking screenshot (format: [scope::]type=value, e.g., |
| `--waitFor` | "CSS=#content" "example.com::XPATH=//div[@class='loaded']") |
| `--cookie <cookies...>` | Set cookies used when visiting the urls (format: [scope::]cookie_value, e.g., --cookie "session=abc123" "example.com::auth=token123; Path=/; Secure; HttpOnly") |
| `--header <headers...>` | Set HTTP headers used when visiting the urls (format: [scope::]name=value, e.g., --header "Authorization=Bearer token" "example.com::Accept=application/json") |
| `--localStorage <items...>` | Set localStorage values used when visiting urls (format: [scope::]key=value) |
| `--delay <delays...>` | Add delay in milliseconds before taking screenshot (1-60000, format: [scope::]milliseconds, e.g., --delay "1000" "example.com::2000") |
| `--outputDir <dir>` | Output directory (default: ".") |
| `-h, --help` | display help for command |


---
Original source: https://buddy.works/docs/cli/scrape