Strip leading/trailing spaces from card names.

May prevent certain image sources from working (mtgs?)
This commit is contained in:
dev-id
2017-09-02 21:51:04 -05:00
parent c036cefbf7
commit 00dd79bf14

View File

@@ -41,6 +41,9 @@ def parse_mtgs(mtgs, manual_cards=[], card_corrections=[], delete_cards=[], rela
print "Removing card scraped from MTGS RSS but not in their gallery: " + card['name']
cards.remove(card)
for card in cards:
card['name'] = card['name'].strip()
# if we didn't find any cards, let's bail out to prevent overwriting good data
if len(cards) < 1:
sys.exit("No cards found, exiting to prevent file overwrite")