依赖本机安装的 Google Chrome 浏览器,没有则无法截图;默认只打开图片查看器而不落盘,需加 --output-dir 才会保存文件;截图依赖访问 Twitter 页面,网络不通或推文被删会失败。
npm i -g snap-tweet
snap-tweet https://twitter.com/jack/status/20README 未说明显存或 GPU 要求,仅要求本机装有 Google Chrome 浏览器。
把推文截成干净无按钮无水印的图片,适合嵌入文档或静态页面
一条命令把推文截成干净图片,自动隐藏点赞、转发等互动数据,适合引用和存档。
核心能力
- 用 --width 调整截图宽度,默认 550px
- 支持深色模式与圆角透明背景
- 用 --locale 切换推文界面语言
- 用 --show-thread 把父推文一并截入
- 一次传入多个推文链接批量截图
容易踩的坑
- v1.2.3最新正式版2022-08-23 · 2022-08-23 20:21 UTC
- v1.2.22022-02-16 · 2022-02-16 19:41 UTC
- v1.2.12021-11-03 · 2021-11-03 16:43 UTC
- v1.2.02021-08-19 · 2021-08-19 14:48 UTC
- v1.1.02021-08-12 · 2021-08-12 19:48 UTC
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
📸 snap-tweet
Command-line tool to capture clean and simple tweet snapshots.
Features
- 🎛 Adjustable width
- 💅 Rounded corners & transparent background
- 🌚 Dark mode
- 🌐 Customizable locale
- 🙅♀️ No "Share" & "Info" buttons
- 💖 No watermark
- 🔥 Snap multiple tweets at once
Support this project by ⭐️ starring and sharing it. Follow me to see what other cool projects I'm working on! ❤️
🚀 Install
The only requirement is to have Google Chrome Browser.
npm i -g snap-tweet
npx
Use npx to run without installation.
npx snap-tweet
🚦 Quick usage
Basic usage
By default, the tweet snap is opened in your default image viewer so you can decide whether to save or not.
snap-tweet https://twitter.com/jack/status/20
Save to directory
Save the tweet snap to a specified directory using the --output-dir flag.
snap-tweet https://twitter.com/jack/status/20 --output-dir ~/Desktop
Dark mode
Snap a tweet in dark mode using the --dark-mode flag.
snap-tweet https://twitter.com/jack/status/20 --dark-mode
Custom width
Pass in a custom width for the tweet using the --width flag.
snap-tweet https://twitter.com/github/status/1390807474748416006 --width 900
Localization
Pass in a different locale using the --locale flag.
snap-tweet https://twitter.com/TwitterJP/status/578707432 --locale ja
Show Thread
Use the --show-thread flag to include the parent tweet in the screenshot.
snap-tweet https://twitter.com/jack/status/1108487919969275904 --show-thread
Multiple tweets
Snap multiple tweets at once by passing in multiple tweet URLs.
snap-tweet https://twitter.com/naval/status/1002103497725173760 https://twitter.com/naval/status/1002103559276478464 https://twitter.com/naval/status/1002103627387813888
Manual
snap-tweet
Usage:
$ snap-tweet <...tweet urls>
Options:
-o, --output-dir <path> Tweet screenshot output directory
-w, --width <width> Width of tweet (default: 550)
-t, --show-thread Show tweet thread
-d, --dark-mode Show tweet in dark mode
-l, --locale <locale> Locale (default: en)
-h, --help Display this message
-v, --version Display version number
🏋️♀️ Motivation
It all started when I simply wanted to embed a couple tweets into a Google Doc...
Quick googling showed that there's no way to embed an actual tweet because Google Docs doesn't support HTML iframes or JavaScript. And I wasn't going to install a plugin just for some tweets.
I figured I could just take a screenshot of the tweet. But only to realize I would be spending way too much time cropping each tweet, and they still wouldn't be perfect because of the lack of transparency behind the rounded corners. And not to mention, the static screenshot would include buttons like "Copy link to Tweet" that looked actionable but actually weren't.
I found services like Screenshot Guru (and their Twitter Screenshots Chrome extension), Pikaso, etc. but none of them met my needs (low quality images, actionable buttons present, watermarks, etc.).
All I wanted to do was to embed the tweet like how it looks in the official embedder into a static environment. No sign up, no watermark, no BS... It shouldn't be this hard! 🤯
So of course, I spent a few hours developing a tool to save us all the headache 😇
(I know, this is some pretty crazy yak shaving. Checkout my other projects to see how deep I've gone.)
🙋♀️ Need help?
If you have a question about usage, ask on Discussions.
If you'd like to make a feature request or file a bug report, open an Issue.