# screenshot-tweet

> Screenshot a Twitter tweet.

Latest version **1.1.1** (published 2018-09-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install screenshot-tweet
pnpm add screenshot-tweet
yarn add screenshot-tweet
bun add screenshot-tweet
```

Provides the command `screenshot-tweet`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-09-26 |
| First published | 2016-12-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 67 |
| Author | Luke Horvat |
| Maintainers | lukehorvat |
| Keywords | twitter, tweet, screenshot, capture, image |

## Links

- npm: https://www.npmjs.com/package/screenshot-tweet
- Repository: https://github.com/lukehorvat/screenshot-tweet
- Homepage: https://github.com/lukehorvat/screenshot-tweet#readme
- Issues: https://github.com/lukehorvat/screenshot-tweet/issues
- npm.io page: https://npm.io/package/screenshot-tweet

## Dependencies (5)

- [chalk](https://npm.io/package/chalk.md) 1.1.3
- [yargs](https://npm.io/package/yargs.md) 4.6.0
- [tildify](https://npm.io/package/tildify.md) 1.2.0
- [nightmare](https://npm.io/package/nightmare.md) 2.8.1
- [twitter-url-parser](https://npm.io/package/twitter-url-parser.md) 0.0.1

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2018-09-26
- 1.1.0 — 2018-05-12
- 1.0.5 — 2018-02-09
- 1.0.4 — 2018-02-03
- 1.0.3 — 2018-02-03
- 1.0.2 — 2018-02-03
- 1.0.1 — 2016-12-10
- 1.0.0 — 2016-12-10

## README

# screenshot-tweet [![NPM version](http://img.shields.io/npm/v/screenshot-tweet.svg?style=flat-square)](https://www.npmjs.org/package/screenshot-tweet)

Screenshot a Twitter tweet.

![](https://i.imgur.com/dwSuivL.png)

## Installation

Install the package with NPM:

```bash
$ npm install -g screenshot-tweet
```

The `-g` flag is recommended for easy CLI usage, but completely optional.

## API

The package exposes a function with the signature `(tweetUrl, filePath)`, where `tweetUrl` is the URL of the tweet and `filePath` is the filesystem location to save the screenshot at. Returns a Promise.

Example:

```javascript
import screenshotTweet from "screenshot-tweet";

screenshotTweet(
  "https://twitter.com/reactjs/status/912712906407501825",
  "tweet.jpg"
).then(() => {
  console.log("Success");
}).catch(error => {
  console.error("Error");
});
```

If `filePath` is omitted, the Promise will resolve with a Buffer containing the screenshot data.

## CLI

Execute `screenshot-tweet` from the command line with the following arguments:

```bash
$ screenshot-tweet TWEET_URL FILE_PATH
```

Example:

```bash
$ screenshot-tweet https://twitter.com/reactjs/status/912712906407501825 tweet.jpg
```

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