Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fa0311/twitter-snap

Create beautiful Tweet images/videos fast. Twitter archiver.
https://github.com/fa0311/twitter-snap

archive command-line scraper twitter

Last synced: about 2 months ago
JSON representation

Create beautiful Tweet images/videos fast. Twitter archiver.

Awesome Lists containing this project

README

        

# twitter-snap

Create beautiful Tweet images fast.
Fast, good design, Browser is not a dependency.

```shell
npx twitter-snap@latest https://twitter.com/elonmusk/status/1770222178279252062
```






[More Samples](https://github.com/fa0311/twitter-snap/issues/47)

```shell
# Interactive mode
npx twitter-snap@latest -i
```

```shell
# Output the API response directly to a file in raw JSON format.
npx twitter-snap@latest --theme Json https://x.com/elonmusk/status/1349129669258448897
# Download the media file and save it directly to a file in its raw format.
npx twitter-snap@latest --theme MediaOnly https://x.com/elonmusk/status/1349129669258448897
```

## Install

`npm -g i twitter-snap@latest`

## Arguments

```shell
$ twitter-snap --help
Create beautiful Tweet images fast

USAGE
$ twitter-snap ID [--api
getTweetResultByRestId|getTweetDetail|getSearchTimeline|getHomeTimeline|getHomeLatestTimeline|getListLatestTweetsTim
eline|getUserTweets|getUserTweetsAndReplies|getUserMedia|getLikes|getBookmarks] [--browserHeadless]
[--browserProfile ] [--cookiesFile ] [--debug] [--interactive] [--ffmpegAdditonalOption ]
[--ffmpegPath ] [--ffprobePath ] [--fontPath ] [--limit ] [--noCleanup] [-o ]
[--sessionType ] [--simpleLog] [--sleep ] [--theme
RenderOceanBlueColor|RenderOceanBlueDarkColor|RenderSunsetGardenColor|RenderSunsetGardenDarkColor|RenderDawnBlossomC
olor|RenderDawnBlossomDarkColor|RenderFierySunsetColor|RenderFierySunsetDarkColor|RenderTwilightSkyColor|RenderTwili
ghtSkyDarkColor|RenderPlainColor|RenderPlainDarkColor|RenderTransparent|RenderTransparentDark|RenderTransparentShado
w|RenderTransparentDarkShadow|RenderMakeItAQuote|MediaOnly|Json] [--width ] [--scale ]

ARGUMENTS
ID Twitter status id

FLAGS
-o, --output=
[default: {if-media-only:{id}-{media-id}:{id}}.{if-photo:png:mp4}] Output file name

--api=
[default: getTweetResultByRestId] API type

--browserHeadless
Browser headless

--browserProfile=
[default: ~/.cache/twitter-snap/profiles] Browser profile

--cookiesFile=
[default: cookies.json] Cookies file

--debug
Debug

--ffmpegAdditonalOption=
FFmpeg additonal option

--ffmpegPath=
[default: ffmpeg] FFmpeg path

--ffprobePath=
[default: ffprobe] FFprobe path

--fontPath=
[default: ~/.cache/twitter-snap/fonts] Font path

--interactive
Enable interactive mode

--limit=
[default: 30] Limit count

--noCleanup
Cleanup

--scale=
[default: 1] Scale

--sessionType=
[default: guest] Session type

--simpleLog
Simple log

--sleep=
Sleep (ms)

--theme=
[default: RenderOceanBlueColor] Theme type

--width=
[default: 650] Width

DESCRIPTION
Create beautiful Tweet images fast
https://github.com/fa0311/twitter-snap

EXAMPLES
Create a snap from tweet id with minimal commands.

$ twitter-snap https://twitter.com/elonmusk/status/1349129669258448897

Enable interactive mode.

$ twitter-snap --interactive

```

## Dependence

- [ffmpeg](https://ffmpeg.org/) (for video)