Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't understand... where is it pulling the GIFs from? How does it determine what GIF to use for a given card?


The code is pretty short and easy to read:

It parses the card names and IDs from a CSV file here:

https://github.com/minimaxir/magic-the-gifening/blob/master/...

And calls create_mtg_gif, which calls get_giphy_gif, which requests GIFs from the giphy API by searching for the card name, and then finds one that has an appropriate aspect ratio.

https://github.com/minimaxir/magic-the-gifening/blob/master/...


Specifically, the GIPHY Random endpoint, which takes in a tag as a parameter: https://developers.giphy.com/docs/




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: