Closed vorpal-buildbot closed 3 years ago
Also Delver of Secrets right now
The card_color
table has no entry for Delver of Secrets.
What scryfall sends seems to make sense:
# -*- coding: utf-8 -*-
{
'object': 'card',
'id': '11bf83bb-c95b-4b4f-9a56-ce7a1816307a',
'oracle_id': 'edd531b9-f615-4399-8c8c-1c5e18c4acbf',
'multiverse_ids': [226749, 226755],
'mtgo_id': 42436,
'mtgo_foil_id': 42437,
'tcgplayer_id': 56246,
'cardmarket_id': 250620,
'name': 'Delver of Secrets // Insectile Aberration',
'lang': 'en',
'released_at': '2011-09-30',
'uri': 'https://api.scryfall.com/cards/11bf83bb-c95b-4b4f-9a56-ce7a1816307a',
'scryfall_uri': 'https://scryfall.com/card/isd/51/delver-of-secrets-insectile-aberration?utm_source=api',
'layout': 'transform',
'highres_image': True,
'image_status': 'highres_scan',
'cmc': 1.0,
'type_line': 'Creature \xe2\x80\x94 Human Wizard // Creature \xe2\x80\x94 Human Insect',
'color_identity': ['U'],
'keywords': ['Flying', 'Transform'],
'card_faces': [{
'object': 'card_face',
'name': 'Delver of Secrets',
'mana_cost': '{U}',
'type_line': 'Creature \xe2\x80\x94 Human Wizard',
'oracle_text': 'At the beginning of your upkeep, look at the top card of your library. You may reveal that card. If an instant or sorcery card is revealed this way, transform Delver of Secrets.'
,
'colors': ['U'],
'power': '1',
'toughness': '1',
'artist': 'Nils Hamm',
'artist_id': 'c540d1fc-1500-457f-93cf-d6069ee66546',
'illustration_id': '1c2fee9b-89ea-4ab1-a751-451c3cd65a88',
'image_uris': {
'small': 'https://c1.scryfall.com/file/scryfall-cards/small/front/1/1/11bf83bb-c95b-4b4f-9a56-ce7a1816307a.jpg?1562826346'
,
'normal': 'https://c1.scryfall.com/file/scryfall-cards/normal/front/1/1/11bf83bb-c95b-4b4f-9a56-ce7a1816307a.jpg?1562826346'
,
'large': 'https://c1.scryfall.com/file/scryfall-cards/large/front/1/1/11bf83bb-c95b-4b4f-9a56-ce7a1816307a.jpg?1562826346'
,
'png': 'https://c1.scryfall.com/file/scryfall-cards/png/front/1/1/11bf83bb-c95b-4b4f-9a56-ce7a1816307a.png?1562826346'
,
'art_crop': 'https://c1.scryfall.com/file/scryfall-cards/art_crop/front/1/1/11bf83bb-c95b-4b4f-9a56-ce7a1816307a.jpg?1562826346'
,
'border_crop': 'https://c1.scryfall.com/file/scryfall-cards/border_crop/front/1/1/11bf83bb-c95b-4b4f-9a56-ce7a1816307a.jpg?1562826346'
,
},
}, {
'object': 'card_face',
'name': 'Insectile Aberration',
'mana_cost': '',
'type_line': 'Creature \xe2\x80\x94 Human Insect',
'oracle_text': 'Flying',
'colors': ['U'],
'color_indicator': ['U'],
'power': '3',
'toughness': '2',
'flavor_text': '"Unfortunately, all my test animals have died or escaped, so I shall be the final subject. I feel no fear. This is a momentous night."\n\xe2\x80\x94Laboratory notes, final entry'
,
'artist': 'Nils Hamm',
'artist_id': 'c540d1fc-1500-457f-93cf-d6069ee66546',
'illustration_id': 'c2b5f731-771b-4949-90f3-0ad40d676100',
'image_uris': {
'small': 'https://c1.scryfall.com/file/scryfall-cards/small/back/1/1/11bf83bb-c95b-4b4f-9a56-ce7a1816307a.jpg?1562826346'
,
'normal': 'https://c1.scryfall.com/file/scryfall-cards/normal/back/1/1/11bf83bb-c95b-4b4f-9a56-ce7a1816307a.jpg?1562826346'
,
'large': 'https://c1.scryfall.com/file/scryfall-cards/large/back/1/1/11bf83bb-c95b-4b4f-9a56-ce7a1816307a.jpg?1562826346'
,
'png': 'https://c1.scryfall.com/file/scryfall-cards/png/back/1/1/11bf83bb-c95b-4b4f-9a56-ce7a1816307a.png?1562826346'
,
'art_crop': 'https://c1.scryfall.com/file/scryfall-cards/art_crop/back/1/1/11bf83bb-c95b-4b4f-9a56-ce7a1816307a.jpg?1562826346'
,
'border_crop': 'https://c1.scryfall.com/file/scryfall-cards/border_crop/back/1/1/11bf83bb-c95b-4b4f-9a56-ce7a1816307a.jpg?1562826346'
,
},
}],
'legalities': {
'standard': 'not_legal',
'future': 'not_legal',
'historic': 'not_legal',
'gladiator': 'not_legal',
'pioneer': 'not_legal',
'modern': 'legal',
'legacy': 'legal',
'pauper': 'legal',
'vintage': 'legal',
'penny': 'legal',
'commander': 'legal',
'brawl': 'not_legal',
'historicbrawl': 'not_legal',
'paupercommander': 'legal',
'duel': 'legal',
'oldschool': 'not_legal',
'premodern': 'not_legal',
},
'games': ['paper', 'mtgo'],
'reserved': False,
'foil': True,
'nonfoil': True,
'oversized': False,
'promo': False,
'reprint': False,
'variation': False,
'set_id': 'd1026945-2969-42b9-be53-f941405a58cb',
'set': 'isd',
'set_name': 'Innistrad',
'set_type': 'expansion',
'set_uri': 'https://api.scryfall.com/sets/d1026945-2969-42b9-be53-f941405a58cb',
'set_search_uri': 'https://api.scryfall.com/cards/search?order=set&q=e%3Aisd&unique=prints',
'scryfall_set_uri': 'https://scryfall.com/sets/isd?utm_source=api',
'rulings_uri': 'https://api.scryfall.com/cards/11bf83bb-c95b-4b4f-9a56-ce7a1816307a/rulings',
'prints_search_uri': 'https://api.scryfall.com/cards/search?order=released&q=oracleid%3Aedd531b9-f615-4399-8c8c-1c5e18c4acbf&unique=prints',
'collector_number': '51',
'digital': False,
'rarity': 'common',
'card_back_id': '0aeebaf5-8c7d-4636-9e82-8c27447861f7',
'artist': 'Nils Hamm',
'artist_ids': ['c540d1fc-1500-457f-93cf-d6069ee66546'],
'border_color': 'black',
'frame': '2003',
'frame_effects': ['sunmoondfc'],
'full_art': False,
'textless': False,
'booster': True,
'story_spotlight': False,
'edhrec_rank': 10321,
'prices': {
'usd': '1.25',
'usd_foil': '7.49',
'eur': '1.13',
'eur_foil': '6.45',
'tix': '0.03',
},
'related_uris': {
'gatherer': 'https://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=226749',
'tcgplayer_infinite_articles': 'https://infinite.tcgplayer.com/search?contentMode=article&game=magic&partner=scryfall&q=Delver+of+Secrets+%2F%2F+Insectile+Aberration&utm_campaign=affiliate&utm_medium=api&utm_source=scryfall',
'tcgplayer_infinite_decks': 'https://infinite.tcgplayer.com/search?contentMode=deck&game=magic&partner=scryfall&q=Delver+of+Secrets+%2F%2F+Insectile+Aberration&utm_campaign=affiliate&utm_medium=api&utm_source=scryfall',
'edhrec': 'https://edhrec.com/route/?cc=Delver+of+Secrets',
'mtgtop8': 'https://mtgtop8.com/search?MD_check=1&SB_check=1&cards=Delver+of+Secrets',
},
}
There is no colors
at the printing level, only within each of the card_faces
. That's a change. Our code does this:
for color in p.get('colors', []):
color_id = colors[color]
card_color_values.append({'card_id': card_id, 'color_id': color_id})
where p
is the printing, not a card face.
Simplest fix here is to spider each face and apply to the card as a whole. We could get more sophisticated and create face_color
rather than card_color
and derive from there later the colors of the card as a whole.
a7ca20c
Reported on Discord by bakert#2193