Python wrapper for the CGHMC API (Frinkiac, Morbotron, Master Of All Science and more!)
MIT License
.. image:: https://orig00.deviantart.net/43c8/f/2012/137/f/8/internet_king_popup_banner_by_blueamnesiac-d503b3x.png :alt: Internet King Popup Banner by BLUEamnesiac
.. image:: https://img.shields.io/pypi/v/compuglobal.svg :target: https://pypi.python.org/pypi/compuglobal .. image:: https://img.shields.io/pypi/pyversions/compuglobal.svg :target: https://pypi.python.org/pypi/compuglobal .. image:: https://img.shields.io/badge/PRs-welcome-brightgreen.svg :target: http://makeapullrequest.com
Python wrapper for all endpoints of the following undocumented APIs:
Frinkiac
, Morbotron
, Master Of All Science
, Capital Beat Us
and Good God Lemon
_
Note: I'll be keeping the wrapper up to date as more APIs are released.
CompuGlobal allows for both random and searchable screencaps, images and gifs embedded with default or custom captions for the following shows:
The Simpsons, Futurama, Rick and Morty, West Wing and 30 Rock.
Make sure to acquaint yourself with the API using the documentation
_.
To install the library, you can just run the following command:
::
python3 -m pip install -U compuglobal
.. code:: py
import compuglobal
simpsons = compuglobal.Frinkiac()
# Random
screencap = simpsons.get_random_screencap()
# Search
screencap = simpsons.search_for_screencap('nothing at all')
# Images/Gifs
image = screencap.get_meme_url()
gif = screencap.get_gif_url()
For documented examples, check here.
_
.. code:: py
import asyncio
import compuglobal
async def main():
simpsons = compuglobal.aio.Frinkiac()
# Random
screencap = await simpsons.get_random_screencap()
# Search
screencap = await simpsons.search_for_screencap('nothing at all')
# Images/Gifs
image = screencap.get_meme_url()
gif = await screencap.get_gif_url()
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
For documented examples, check here.
_
0.2.7 - Breaking changes
These changes are intended to provide more flexibility in the formatting of captions:
format_caption()
method to CompuGlobalAPI objects. Thisencode_caption()
encode_caption()
method now only takes a caption parameter.format_caption()
0.2.1 - Breaking Changes
search()
, get_frames()
and get_nearby_frames()
Creators and contributors of Frinkiac
, Morbotron
, Master of All Science
, Good God Lemon
and Capital Beat Us
_:
Paul Kehrer
_Sean Schulte
_Allie Young
_Max
, Jon Bernhardt
, Nick Beatty
, Vimp
, juz
, Iconfactory and Ged Maheux
BLUEamnesiac
_ for the Internet King Popup Banner
Named CompuGlobal as shorthand for CompuGlobalHyperMegaCap
_, as the family of websites are named.
.. _documentation: http://compuglobal.readthedocs.io/ .. _Frinkiac: https://frinkiac.com/ .. _Morbotron: https://morbotron.com/ .. _Master Of All Science: https://masterofallscience.com/ .. _Capital Beat Us: https://capitalbeat.us/ .. _Good God Lemon: https://goodgodlemon.com/ .. _here.: https://github.com/MitchellAW/CompuGlobal/tree/master/examples .. _Paul Kehrer: https://twitter.com/reaperhulk .. _Sean Schulte: https://twitter.com/sirsean .. _Allie Young: https://twitter.com/seriousallie .. _Max: http://codepen.io/MyXoToD/ .. _Jon Bernhardt: http://www.dafont.com/akbar.font .. _Nick Beatty: https://twitter.com/bumlaser .. _Ged Maheux: https://twitter.com/gedeon .. _Vimp: http://kornykattos.deviantart.com/ .. _juz: http://screenpeepers.com/profile/juz .. _BLUEamnesiac: https://blueamnesiac.deviantart.com/ .. _CompuGlobalHyperMegaCap: https://langui.sh/2017/07/30/master-of-all-science-rick-and-morty/