Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krishh-konar/Twitter-Image-Downloader
Downloads media uploaded on twitter from a given account.
https://github.com/krishh-konar/Twitter-Image-Downloader
Last synced: 14 days ago
JSON representation
Downloads media uploaded on twitter from a given account.
- Host: GitHub
- URL: https://github.com/krishh-konar/Twitter-Image-Downloader
- Owner: krishh-konar
- License: mit
- Created: 2016-04-04T19:38:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-10-24T11:12:21.000Z (about 2 years ago)
- Last Synced: 2024-08-01T15:11:19.594Z (3 months ago)
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 18
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twitter Image Downloader
Downloads images/photos uploaded on twitter from a given twitter handle.### Dependencies
This tool uses the Python [tweepy](www.tweepy.org) library and [wget](https://www.gnu.org/software/wget/) package.
You can install requirements using `requirements.txt`.
`pip install -r requirements.txt`
### Authorization Tokens
You will also need to create an app account on https://dev.twitter.com/apps to get authorization tokens
1. Sign in with your Twitter account
2. Create a new app.
3. Fill necessary details
4. Generate OAuth tokens for the app.Following these steps and a successful app creation, you will recieve 3 tokens for your app, namely `API_KEY`, `API_KEY_SECRET` and `BEARER_TOKEN`.
### Usage* Edit the `API_Tokens.py` file and add these tokens you recieved in the previous step and save.
#### Using CLI
* Run using `twitter_image_downloader.py [-h] [-H HANDLE] [-n [MAX_TWEETS]] [-t [{images,videos,gifs,all} ...]]`Examples:
```
python twitter_image_downloader.py --handle arsenal
python twitter_image_downloader.py --handle arsenal --max-tweets 10 --type images,gifs
```
#### Using Interactive UI
1. Run the script (`python twitter_image_downloader.py`).
2. Enter the user's twitter handle `(@)` you want to download images from, followed by max. number of tweets you want to search for.
3. The images are downloaded inside a folder named `twitter_images`, in the folder named ``.Example:
```
$ python twitter_image_downloader.pyTwitter Image Downloader:
========================Enter the twitter handle of the Account to download media from: arsenal
Enter Max. number of tweets to search (default: 1000): 10
Enter type of media (images/gifs/videos/all) (default: images) gifs imagesFetching tweets.....
...
```