[wikifeet] fix 'bdate' parsing
and update 'shoesize' test results
This commit is contained in:
@@ -34,11 +34,11 @@ class WikifeetGalleryExtractor(GalleryExtractor):
|
||||
"celeb" : self.celeb,
|
||||
"type" : self.type,
|
||||
"birthplace": text.unescape(extr('"bplace":"', '"')),
|
||||
"birthday": text.parse_datetime(text.unescape(
|
||||
extr('"bdate":"', '"'))),
|
||||
"shoesize": text.unescape(extr('"ssize":', ',')),
|
||||
"rating": text.parse_float(extr('"score":', ',')),
|
||||
"celebrity": text.unescape(extr('"cname":"', '"')),
|
||||
"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):
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user