diff --git a/gallery_dl/extractor/wikifeet.py b/gallery_dl/extractor/wikifeet.py index d3586c01..f7bfeb2d 100644 --- a/gallery_dl/extractor/wikifeet.py +++ b/gallery_dl/extractor/wikifeet.py @@ -33,12 +33,12 @@ class WikifeetGalleryExtractor(GalleryExtractor): return { "celeb" : self.celeb, "type" : self.type, - "rating" : text.parse_float(extr('"ratingValue": "', '"')), - "celebrity" : text.unescape(extr("times'>", "")), - "shoesize" : text.remove_html(extr("Shoe Size:", "edit")), - "birthplace": text.remove_html(extr("Birthplace:", "edit")), - "birthday" : text.parse_datetime(text.remove_html( - extr("Birth Date:", "edit")), "%Y-%m-%d"), + "birthplace": text.unescape(extr('"bplace":"', '"')), + "birthday" : text.parse_datetime(text.unescape( + extr('"bdate":"', '"'))[:10], "%Y-%m-%d"), + "shoesize" : text.unescape(extr('"ssize":', ',')), + "rating" : text.parse_float(extr('"score":', ',')), + "celebrity" : text.unescape(extr('"cname":"', '"')), } def images(self, page): @@ -61,5 +61,6 @@ class WikifeetGalleryExtractor(GalleryExtractor): for tag in data["tags"] if tag in tagmap ], }) - for data in util.json_loads(text.extr(page, "['gdata'] = ", ";")) + for data in + util.json_loads("[" + text.extr(page, '"gallery":[', '],') + "]") ] diff --git a/test/results/wikifeet.py b/test/results/wikifeet.py index 2a8b849b..0e897042 100644 --- a/test/results/wikifeet.py +++ b/test/results/wikifeet.py @@ -23,7 +23,7 @@ __tests__ = ( "pid" : int, "width" : int, "height" : int, - "shoesize" : r"re:\d+ US", + "shoesize" : r"re:\d+", "type" : "women", "tags" : list, }, @@ -43,7 +43,7 @@ __tests__ = ( "pid" : int, "width" : int, "height" : int, - "shoesize" : "12.5 US", + "shoesize" : "22", "type" : "men", "tags" : list, }, diff --git a/test/results/wikifeetx.py b/test/results/wikifeetx.py index a3d2be6e..4ba7f4a3 100644 --- a/test/results/wikifeetx.py +++ b/test/results/wikifeetx.py @@ -17,13 +17,13 @@ __tests__ = ( "celeb" : "Tifa_Quinn", "celebrity" : "Tifa Quinn", - "birthday" : "[NOT SET]", + "birthday" : "", "birthplace": "United States", "rating" : float, "pid" : int, "width" : int, "height" : int, - "shoesize" : "4 US", + "shoesize" : "5", "type" : "women", "tags" : list, },