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.