Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/fa0311/twitter-snap
- Owner: fa0311
- License: other
- Created: 2023-11-04T03:41:22.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-30T06:49:50.000Z (2 months ago)
- Last Synced: 2024-10-31T07:55:34.839Z (about 2 months ago)
- Topics: archive, command-line, scraper, twitter
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/twitter-snap
- Size: 3.56 MB
- Stars: 17
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 fastUSAGE
$ 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 idFLAGS
-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] WidthDESCRIPTION
Create beautiful Tweet images fast
https://github.com/fa0311/twitter-snapEXAMPLES
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)