Async and Sync Python Wrapper for the RedGIFs API.
Project description
redgifs
Async and Sync Python Wrapper for the RedGIFs API.
⭐ Please star this repo to support the developer and to encourage the development of this project!
Installation
pip install -U redgifs
Development version
pip install -U git+https://github.com/scrazzz/redgifs
redgifs works on Python versions 3.8 and above.
Quickstart
1. Command Line:
$ redgifs --help
Usage: redgifs [OPTIONS] [URLS]...
Options:
-v, --version Shows currently installed version.
-q, --quality [sd|hd] Video quality of GIF to download. [default: hd]
-f, --folder FOLDER_NAME The folder to save the downloads to.
-i, --input FILE_NAME Download URLs from a newline seperated txt file.
--images Download only images from a user profile.
--help Show this message and exit.
Examples:
Download multiple GIFs
$ redgifs https://redgifs.com/watch/abc https://redgifs.com/watch/xyz https://redgifs.com/watch/def
Downloading abc...
Download complete
Downloading xyz...
Download complete
Downloading def...
Download complete
Download GIFs to a specific folder
$ ls
Home Downloads Homework Music
Backup Documents Videos Games
$ redgifs https://redgifs.com/watch/xyz --quality sd --folder Homework
Downloading xyz...
Download complete
$ ls Homework
xyz.mp4
Download GIFs from a text file that contains a list of URLs
$ # urls.txt:
$ # https://redigfs.com/watch/xyz
$ # https://redigfs.com/watch/qwe
$ # https://redigfs.com/watch/abc
$ # https://redigfs.com/watch/rst
$ redgifs -i urls.txt
Downloading xyz...
Download complete
Downloading qwe...
Download all GIFs from a user's profile
$ mkdir rg_vids
$ redgifs https://redgifs.com/users/usernamethatexists -f rg_vids
Downloaded 1/3 GIFs
Downloaded 2/3 GIFs
...
Downloaded 3/3 videos of user usernamethatexists to folder rg_vids sucessfully!
2. Synchronous usage:
import redgifs
api = redgifs.API()
api.login() # Login with temporary token
response = api.search('3D')
print(response)
api.close()
3. Asynchronous usage:
import asyncio
from redgifs.aio import API # note this
async def main():
api = API()
await api.login() # Login with temporary token
response = await api.search('3D')
print(response)
await api.close()
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
More examples can be found in the examples directory.
Links
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file redgifs-2.4.0.tar.gz.
File metadata
- Download URL: redgifs-2.4.0.tar.gz
- Upload date:
- Size: 109.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4396bc8bbc16ea73574c5482ef3efa2e823b9640f7ec4c8d7407c62665288dfa
|
|
| MD5 |
94603c4f1151cf1bb43d15fa81d8d323
|
|
| BLAKE2b-256 |
2ebf1669ce5370fb498692bffbb7f0fbc83a8b9c2cfe4f4a61c71db6c6eb8e3c
|
Provenance
The following attestation bundles were made for redgifs-2.4.0.tar.gz:
Publisher:
pypi.yml on scrazzz/redgifs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
redgifs-2.4.0.tar.gz -
Subject digest:
4396bc8bbc16ea73574c5482ef3efa2e823b9640f7ec4c8d7407c62665288dfa - Sigstore transparency entry: 908458904
- Sigstore integration time:
-
Permalink:
scrazzz/redgifs@de47ecdcd7ca7c13c453647ccf2f3ad77fffd30a -
Branch / Tag:
refs/tags/v2.4.0 - Owner: https://github.com/scrazzz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@de47ecdcd7ca7c13c453647ccf2f3ad77fffd30a -
Trigger Event:
release
-
Statement type:
File details
Details for the file redgifs-2.4.0-py3-none-any.whl.
File metadata
- Download URL: redgifs-2.4.0-py3-none-any.whl
- Upload date:
- Size: 121.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3f9eb4fc3eea5dcb0e3b9ccbb4ad3e9a0876268d133224bff031f97864b96c6
|
|
| MD5 |
a368b35f597d90fe714c977ed8938fa5
|
|
| BLAKE2b-256 |
88c45e190df67ebcad25fe4c6ef35572fcdf5ec16cb6274816edeb9fa5449596
|
Provenance
The following attestation bundles were made for redgifs-2.4.0-py3-none-any.whl:
Publisher:
pypi.yml on scrazzz/redgifs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
redgifs-2.4.0-py3-none-any.whl -
Subject digest:
b3f9eb4fc3eea5dcb0e3b9ccbb4ad3e9a0876268d133224bff031f97864b96c6 - Sigstore transparency entry: 908458906
- Sigstore integration time:
-
Permalink:
scrazzz/redgifs@de47ecdcd7ca7c13c453647ccf2f3ad77fffd30a -
Branch / Tag:
refs/tags/v2.4.0 - Owner: https://github.com/scrazzz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@de47ecdcd7ca7c13c453647ccf2f3ad77fffd30a -
Trigger Event:
release
-
Statement type: