Skip to main content
https://raw.githubusercontent.com/Ombucha/gocomics.py/main/banner.png PyPI version PyPI downloads Lines of code Repository size

gocomics.py is a Pythonic, fun, and easy-to-use library for fetching comics and metadata from GoComics.com. Whether you want to build a comic reader, analyze trends, or just grab your favorite strip, this package is for you!

Features

  • Fetch any comic by identifier and date

  • Get comic metadata (title, author, description, images, etc.)

  • List all available comics and categories

  • Find popular and political comics

  • Fully documented and type-annotated

  • MIT licensed and open source

Why gocomics.py?

  • Simple: One-liner to fetch a comic!

  • Powerful: Access all the metadata you need

  • Community-driven: Contributions welcome

  • Inspired by comics: Because code should be fun!

Background

In 2024, GoComics.com changed its interface and added a paywall that blocks most comics from non-subscribers. gocomics.py works by programmatically fetching comic data and images, allowing you to access comics and metadata even if they are paywalled on the site.

Requirements

Installation

# Stable release
python3 -m pip install "gocomics.py"  # Unix/macOS
py -m pip install "gocomics.py"       # Windows
# Development version
git clone https://github.com/Ombucha/gocomics.py

Comic API

  • gocomics.Comic - Fetch and explore a comic
    • .identifier (str): The comic’s identifier (e.g., “calvinandhobbes”)

    • .date (datetime, optional): The date of the comic (default: latest)

    • .title, .description, .image_url, .author, .followers_count, .about, .characters, etc.

    • .download(filename=None, path=None): Download the comic image

    • .show(filename=None, path=None): Open the comic image in your default viewer

    • .refresh(): Refresh the comic’s data

  • gocomics.search - List all comics (optionally filter by category or updated today)

  • gocomics.search_political - List political comics (optionally filter by category or updated today)

  • gocomics.get_popular_comics - Get trending/popular comics (optionally political)

  • gocomics.stream_comics - Iterate comics for a strip between two dates

Examples

Basic usage:

from gocomics import Comic
comic = Comic("calvinandhobbes")
print(comic.title)
print(comic.image_url)

Fetch a comic from a specific date:

from datetime import datetime
comic = Comic("garfield", datetime(2020, 1, 1))
print(comic.title, comic.image_url)

Download and show a comic:

path = comic.download(filename="garfield2020.png")
comic.show(filename="garfield2020.png")

Refresh comic data:

comic.refresh()

List all available comic identifiers:

from gocomics.utils import search
all_comics = search()
print(all_comics[:10])  # Show first 10

List comics in a category:

animal_comics = search(categories=["funny-animals"])
print(animal_comics)

List comics updated today:

updated_today = search(last_updated_today=True)
print(updated_today)

List political comics:

from gocomics.utils import search_political
political = search_political()
print(political)

List popular comics:

from gocomics.utils import get_popular_comics
popular = get_popular_comics()
print(popular)

List popular political comics:

popular_political = get_popular_comics(political=True)
print(popular_political)

Stream all comics for a strip between two dates:

from gocomics.utils import stream_comics
from datetime import datetime
for comic in stream_comics("garfield", start_date=datetime(2020, 1, 1), end_date=datetime(2020, 1, 5)):
    print(comic.date, comic.title)

See the Documentation for full API details.

Contributing

We love contributions! Please see CONTRIBUTING.md for guidelines. Lint with pylint, follow PEP 8, and open a PR!

Support & Community

  • Found a bug? Open an issue on GitHub.

  • Questions? Join the discussions.

  • Be kind and have fun - see our Code of Conduct.

License

MIT License. See LICENSE.

Metadata

Release files for gocomics.py 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gocomics.py 2.1.0
File Size Uploaded
gocomics_py-2.1.0.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gocomics.py 2.1.0
File Interpreter ABI Platform
gocomics_py-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.4 kB

Release files / gocomics_py-2.1.0.tar.gz

Download URL gocomics_py-2.1.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eecde8f92d0279a7fbc79c8594c5155c83c3e6bc7a58b7599c343d4b27fa710a
BLAKE2b-256 checksum
How to use checksums
348adabc29c8244f621900accca11972dc412c9c57877b2da632b1ff73aef84e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / gocomics_py-2.1.0-py3-none-any.whl

Download URL gocomics_py-2.1.0-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93367deadc74c512419211ac7fbc6285dfde93b03ed18e221286d28b51ab6cba
BLAKE2b-256 checksum
How to use checksums
666c6e87be5e48614422a4e6c0388ab670bca2d2ce82983b525fc61c08d662e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.0

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page