culturgen
culturgen is a Know Your Meme scraper.
It's originally based on an older scraper package called memedict
(GitHub,
PyPI).
Install
pip install culturgen
Usage
Use search() to get a quick meme definition based on keywords:
>>> import culturgen
>>> culturgen.search('all your base')
All Your Base Are Belong To Us. "All Your Base Are Belong to Us" is a popular
engrish catchphrase that grew popular across the internet as early as in 1998.
An awkward translation of "all of your bases are now under our control", the
quote originally appeared in the opening dialogue of Zero Wing, a 16-bit
shoot'em up game released in 1989. Marked by poor grammar, the "All Your Base"
phrase and the dialogue scene went viral on popular discussion forums in 2000,
spawning thousands of image macros and flash animations featuring the slogan
both on the web and in real life.
If you have a link to the Know Your Meme page (supports paths matching
/memes/:slug only), you can directly fetch information about that meme:
>>> import culturgen
>>> culturgen.fetch('https://knowyourmeme.com/memes/mocking-spongebob')
Mocking SpongeBob. Mocking SpongeBob, also known as Spongemock, refers to an
image macro featuring cartoon character SpongeBob SquarePants in which people
use a picture of SpongeBob to indicate a mocking tone towards an opinion or
[...]
You can also do this with just the meme slug, handy for chat bot link handlers:
>>> import culturgen
>>> culturgen.fetch('all-your-base-are-belong-to-us')
All Your Base Are Belong to Us. "All Your Base Are Belong to Us" is a popular
engrish catchphrase that grew popular across the internet as early as in 1998.
An awkward translation of "all of your bases are now under our control", the
[...]
"AI" disclosure
Small portions of this codebase were partially generated by "AI" tooling. Tool output was human-edited before being committed, and the offending code regions are verbosely demarcated by comments disclaiming the use of an LLM.
No "AI" tool has or will ever be set loose in this project on a task larger than one single function body. Its human author refuses to delegate anything like API design to some giant, glorified autocomplete.
Changelog
0.2.2
- Fixed syntax mistake in section text fetching...
0.2.1
- Reworked utility function responsible for fetching section text
- Modernized package metadata
0.2.0
This version drops the development status back to "4 - Beta" because of some
experiments like changing how search_meme() fetches results.
Stick with culturgen==0.1.0 if you want "memedict, but fixed, but not trying
new things yet". KYM site changes can always break stuff—it's the nature of HTML
scraping—but between here and 1.0.0 there will also be library API changes,
and design/implementation missteps to correct.
- New
fetch()function that works with a KYM page URL or slug- Useful if you already have the URL or slug, and more reliable than the old
workaround (try to search for the slug with
-replaced by)
- Useful if you already have the URL or slug, and more reliable than the old
workaround (try to search for the slug with
- The
search_meme()function now calls the "quick links" backend that KYM's own search bar uses- Undocumented, of course, and subject to breaking (just like scraping HTML from the search result page was, to be fair)
- Extracted some lower-level logic into a
utilsubmodule (not considered public API; available functions and their behavior subject to change!)
0.1.2
- Fixed incorrect return value format of
search_meme()URL field
0.1.1
- Made similarity threshold check case-insensitive
0.1.0
- Updated to fix apparent changes from KYM that broke the old library
- Modernized package metadata
- Made a few miscellaneous tweaks
Metadata
Release files for culturgen 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| culturgen-0.2.2.tar.gz | 7.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| culturgen-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.7 kB
Release files / culturgen-0.2.2.tar.gz
| Download URL | culturgen-0.2.2.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ccd89fdb364c9f5be5bae756b06f878834df49beada188d53da259ec6baffec
|
|
BLAKE2b-256 checksum How to use checksums |
6b303feada989b3b82ed9428861476ef633dfb29afc8d41404d11f0b961322ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 7, 2026.
Transparency logRelease files / culturgen-0.2.2-py3-none-any.whl
| Download URL | culturgen-0.2.2-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c41114ab533595b99a65dba2e9784324fd9c0047b7a3e7c5056bba5f3a60cff4
|
|
BLAKE2b-256 checksum How to use checksums |
a15b727cd67b832168d39d12c441ea2684c589ea9d03331be5e5d5d7f66cda60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 7, 2026.
Transparency log