# @stormking/emere

> a nightmarejs replacement for scraping websites using electron.

Latest version **2.0.4** (published 2025-12-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install @stormking/emere
pnpm add @stormking/emere
yarn add @stormking/emere
bun add @stormking/emere
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2025-12-27 |
| First published | 2023-03-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Stormking |
| Maintainers | stormking |
| Keywords | electron, scraping, nightmarejs |

## Links

- npm: https://www.npmjs.com/package/@stormking/emere
- Repository: https://gitlab.com/stormking/emere
- Homepage: https://gitlab.com/stormking/emere#readme
- Issues: https://gitlab.com/stormking/emere/issues
- npm.io page: https://npm.io/package/@stormking/emere

## Recent versions

- 2.0.4 (latest) — 2025-12-27
- 2.0.3 — 2025-05-25
- 2.0.2 — 2025-01-26
- 2.0.1 — 2023-11-15
- 2.0.0 — 2023-05-03
- 1.1.0 — 2023-03-22
- 1.0.0 — 2023-03-19

## README

# Emere #

Small tool to retrieve HTML or PDF from a loaded webpage with electron.

Works as a minimal replacement for nightmare.js since it hasn't been getting updates for years.

## Usage

See src/main.test.ts for more examples.

```javascript
import run from 'emere';

let bufferWithHtml = await run({
	url: 'http://example.org',
	waitForSelector: 'h1'
});
```

### Options API


```typescript
type RunScript = {
	url: string,								//webpage to call
	header?: Record<string, string|string[]>,	//headers to send when loading
	body?: string,								//request body to send
	method?: string,							//HTTP method to use
	referrer?: string,							//HTTP referrer to set
	waitAfterLoad?: number,						//wait for ms before grabbing the page. still respects timeout
	waitForSelector?: string,					//wait up to the timeout until this element appears on the page
	userAgent?: string,							//user-agent to set
	timeout?: number,							//timeout for the whole process. will kill electron process
	get?: 'html'|'pdf'							//defaults to html when not set
}
```

---
_Source: https://npm.io/package/@stormking/emere · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
