Download tweet images and videos
Project description
[![Build Status](https://travis-ci.org/morinokami/twitter-image-downloader.svg?branch=master)](https://travis-ci.org/morinokami/twitter-image-downloader)
### About
With this program, you can download all images uploaded by a specific twitter user.
### Setup
First, before downloading images, you have to install dependencies using pip:
```
$ pip install -r requirements.txt
```
Of course, you need your api key and api secret as well. if you don't have them, consult [Twitter Developers](https://dev.twitter.com/) and create your application. After you get your api key and api secret, create a json file which should look like:
```
{
"api_key": "your api key",
"api_secret": "your api secret"
}
```
### Usage
To download the images the user of id "foo" has uploaded, enter the command below in the command line:
```
$ python3 twt_img.py foo dest_path -c confidentials.json
```
where ```dest_path``` is the directory where images will be downloaded, and ```confidentials.json``` is a json file containing your api key and api secret.
You can specify which size of images to download using the optional argument ```-s``` (or ```--size```). There are five values you can use for it: ```large```, ```medium```, ```small```, ```orig```, or ```thumb```. If you don't specify this value, images of large size will be downloaded by default.
Provide a number to the ```-l``` or ```--limit``` argument (e.g. ```-l 25```) to limit how many tweets are checked for images (starting with the most recent). Note that if you're using ```--limit``` but not ```--rts```, tweets may be checked in batches smaller than this limit.
Using the ```--rts``` flag, you can also download images contained in retweets.
### About
With this program, you can download all images uploaded by a specific twitter user.
### Setup
First, before downloading images, you have to install dependencies using pip:
```
$ pip install -r requirements.txt
```
Of course, you need your api key and api secret as well. if you don't have them, consult [Twitter Developers](https://dev.twitter.com/) and create your application. After you get your api key and api secret, create a json file which should look like:
```
{
"api_key": "your api key",
"api_secret": "your api secret"
}
```
### Usage
To download the images the user of id "foo" has uploaded, enter the command below in the command line:
```
$ python3 twt_img.py foo dest_path -c confidentials.json
```
where ```dest_path``` is the directory where images will be downloaded, and ```confidentials.json``` is a json file containing your api key and api secret.
You can specify which size of images to download using the optional argument ```-s``` (or ```--size```). There are five values you can use for it: ```large```, ```medium```, ```small```, ```orig```, or ```thumb```. If you don't specify this value, images of large size will be downloaded by default.
Provide a number to the ```-l``` or ```--limit``` argument (e.g. ```-l 25```) to limit how many tweets are checked for images (starting with the most recent). Note that if you're using ```--limit``` but not ```--rts```, tweets may be checked in batches smaller than this limit.
Using the ```--rts``` flag, you can also download images contained in retweets.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for download_twitter_resources-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7c8c3f683d69c224ddaa8ccc010ad011cfd4eceedb9183c48a80efcea355cd7 |
|
MD5 | 51ad1465881926b32933847cf47be005 |
|
BLAKE2b-256 | c52fea1d8f7736282188ee2d70d548d8115e96eb8f613893ed65932700e3693e |