1.1.1 • Published 6 years ago

screenshot-tweet v1.1.1

Weekly downloads
34
License
MIT
Repository
github
Last release
6 years ago

screenshot-tweet NPM version

Screenshot a Twitter tweet.

npm.io

Installation

Install the package with NPM:

$ 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:

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:

$ screenshot-tweet TWEET_URL FILE_PATH

Example:

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

6 years ago

1.1.0

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago