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 hashes)
Built Distribution
newyorker-1.1.0-py3-none-any.whl
(66.4 kB
view hashes)
Close
Hashes for newyorker-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4833f246b3f809713d765335f41c2d5fb55b59757c141cf837eb4aa1f072b49f |
|
MD5 | a0f83a02ca9afa623be649fb33a299f7 |
|
BLAKE2b-256 | 3fe18d2660cb0a92a7687dad74d863edf127b447336d77e147c40380c91c2e3a |