Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

newyorker-1.1.0-py3-none-any.whl (66.4 kB view details)

Uploaded Python 3

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

Hashes for newyorker-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7b652ebb9456ce59e9de77af56aefd650ddaeeb5b5a0869423c6445cc32b5410
MD5 c2222da93603383b7659868f254d749b
BLAKE2b-256 2c4355f3be820a4e952df718164d84015eada97eaaf9b70afdfb7fd9fbb5f979

See more details on using hashes here.

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

Hashes for newyorker-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4833f246b3f809713d765335f41c2d5fb55b59757c141cf837eb4aa1f072b49f
MD5 a0f83a02ca9afa623be649fb33a299f7
BLAKE2b-256 3fe18d2660cb0a92a7687dad74d863edf127b447336d77e147c40380c91c2e3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page