Download images from shitpostbot database
Project description
SPBDL
Download images (custom/random) from shitpostbot database!
SPBDL Module Installation:
Install with pip:
pip install spbdl
Install from source:
$ git clone https://github.com/boidushya/spbdl
$ cd spbdl
$ python setup.py install
USAGE:
import spbdl
import requests
def dl(url):
r = requests.get(url)
with open("randomImage.jpg","wb") as f:
f.write(r.content)
#Random image download
url = spbdl.randImg()
#Queried image download:
url2 = spbdl.getImg("epic") #Uses the default arguments for getting image url
url3 = spbdl.getImg("epic",review="accepted",sort='top', order='created_at',direction="ASC") #Passes custom arguments for getting image url
dl(url)
#dl(url2)
#dl(url3)
ALLOWED VALUES FOR getImg ARGUMENTS:
-
query:
<your search query>(required)
-
review:
accepted(default)awaiting-yespendingawaiting-nodeniedall
-
sort:
random(default)topbottom
-
order:
total_rating(default)last_reviewed_atcreated_at
-
direction:
DESC(default)ASC
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spbdl-2.0.1.tar.gz
(2.9 kB
view details)
File details
Details for the file spbdl-2.0.1.tar.gz.
File metadata
- Download URL: spbdl-2.0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d62cb6ca640375866d4e98acad89b2213a02e36c761819e34df8687cb63a310
|
|
| MD5 |
9138431494d22462675632913636fad2
|
|
| BLAKE2b-256 |
ef2410546b435002c7f38698b4c3b68d7af106af83ddfd9042f8a6a8bdf19e8c
|