https://github.com/xacnio/tweetcapture
A Tweet Screenshot Tool/Package (Python)
https://github.com/xacnio/tweetcapture
python screenshot selenium twitter
Last synced: 20 days ago
JSON representation
A Tweet Screenshot Tool/Package (Python)
- Host: GitHub
- URL: https://github.com/xacnio/tweetcapture
- Owner: xacnio
- License: mit
- Created: 2021-05-31T19:54:27.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-15T01:08:54.000Z (about 1 year ago)
- Last Synced: 2024-12-08T09:08:02.320Z (5 months ago)
- Topics: python, screenshot, selenium, twitter
- Language: Python
- Homepage:
- Size: 1.07 MB
- Stars: 96
- Watchers: 4
- Forks: 17
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TweetCapture
Easily take screenshots of tweets/mentions and save them as image.
## Command-Line Usage
```
> pip install tweet-capture
> tweetcapture https://twitter.com/jack/status/20
> tweetcapture -h
```## Code Usage Examples
- [Cli](tweetcapture/cli.py)
- [Code Examples](tweetcapture/examples/)## Testing
```
> pip3 install opencv-python numpy
> cd tweetcapture/tests/
> python -m unittest
```## Docker Usage
```
docker run --rm -v $(pwd):/app xacnio/tweetcapture -h
docker run --rm -v $(pwd):/app xacnio/tweetcapture https://twitter.com/jack/status/20
```
- *On Windows: Replace `$(pwd)` with `${PWD}`* (**Powershell**)
- *On Windows: Replace `$(pwd)` with `%cd%`* (**Command Line**)## Modes
| # | | |
| --- | ------------------------------------------------- | ---------------------------------------------------- |
| 0 | Hide everything outside tweet content and author. ||
| 1 | Show retweet/like counts. ||
| 2 | Show retweet/like counts and timestamp. ||
| 3 | Show everything. ||
| 4 | Show timestamp. ||
## Night Modes
| # | | |
| --- | ---------- | ---------------------------------------------------- |
| 0 | Light mode ||
| 1 | Dark mode ||
| 2 | Black mode ||
## Show Mentions Example
_If the tweet have a very many mentions, there may be problems because "show more" option not supported. The tool can show only first loaded mentions. You can limit mention count on screenshot by using -sc argument_
```
tweetcapture -sm 3 https://twitter.com/Twitter/status/1445078208190291973
```Image
## Show Parent Tweets Example
```
tweetcapture -sp https://twitter.com/elonmusk/status/1587911540770222081
```Image