Search by keywords and download cartoons from The New Yorker magazine cartoon gallery
Project description
Project Description
Search for and download cartoons from The New Yorker magazine cartoon gallery.
Install
python -m pip install --upgrade newyorker
Running as Script
Usage:
newyorker search-keyword-list [options]
Options:
--outdir, -o Set the output directory for cartoons.
--verbose, -v Show progress trace.
--headers Set the HTTP headers for the requests.
--help, -h Print help.
--version Print the script version.
Examples:
newyorker email --verbose
newyorker design desk -v -o ~/example/cartoons
newyorker santa -v --headers \
'{"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"}'
Using API
from newyorker.cartoons import NYCartoonRetriever
# Windows-style output folder
retriever = NYCartoonRetriever(outdir = r"c:\python\example", verbose = True, \
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36"})
image_count = retriever.retrieve(["email"])
Testing
python -m unittest tests.test_basic
Disclaimer
This project is not associated with The New Yorker magazine.
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
newyorker-1.1.0.tar.gz
(60.7 kB
view details)
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
newyorker-1.1.0-py3-none-any.whl
(66.4 kB
view details)
File details
Details for the file newyorker-1.1.0.tar.gz.
File metadata
- Download URL: newyorker-1.1.0.tar.gz
- Upload date:
- Size: 60.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b652ebb9456ce59e9de77af56aefd650ddaeeb5b5a0869423c6445cc32b5410
|
|
| MD5 |
c2222da93603383b7659868f254d749b
|
|
| BLAKE2b-256 |
2c4355f3be820a4e952df718164d84015eada97eaaf9b70afdfb7fd9fbb5f979
|
File details
Details for the file newyorker-1.1.0-py3-none-any.whl.
File metadata
- Download URL: newyorker-1.1.0-py3-none-any.whl
- Upload date:
- Size: 66.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4833f246b3f809713d765335f41c2d5fb55b59757c141cf837eb4aa1f072b49f
|
|
| MD5 |
a0f83a02ca9afa623be649fb33a299f7
|
|
| BLAKE2b-256 |
3fe18d2660cb0a92a7687dad74d863edf127b447336d77e147c40380c91c2e3a
|