From 780a7c77151b9c51371ac2fe7efbe3e18b25dad9 Mon Sep 17 00:00:00 2001 From: tritoch Date: Fri, 23 Jun 2017 16:14:47 -0500 Subject: [PATCH] WotC Image Gallery Regex Fix (#56) WOTC changed the format for their card gallery, this will find the images with the new format. --- spoilers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spoilers.py b/spoilers.py index 6a141d3f..0c934ad9 100644 --- a/spoilers.py +++ b/spoilers.py @@ -783,6 +783,7 @@ def get_image_urls(mtgjson, isfullspoil, setname, setlongname, setSize=269, seti text2 = requests.get(IMAGES2).text text3 = requests.get(IMAGES3).text wotcpattern = r'{}.*?' WOTC = [] for c in mtgjson['cards']: @@ -790,7 +791,7 @@ def get_image_urls(mtgjson, isfullspoil, setname, setlongname, setSize=269, seti if match: c['url'] = match.groupdict()['img'] else: - match3 = re.search(wotcpattern.format(c['name'].replace('\'','’')), text3, re.DOTALL) + match3 = re.search(wotcpattern2.format(c['name'].replace('\'','’')), text3) if match3: c['url'] = match3.groupdict()['img'] else: