merge #7396: [wikifeet] support redesign
This commit is contained in:
@@ -33,12 +33,12 @@ class WikifeetGalleryExtractor(GalleryExtractor):
|
|||||||
return {
|
return {
|
||||||
"celeb" : self.celeb,
|
"celeb" : self.celeb,
|
||||||
"type" : self.type,
|
"type" : self.type,
|
||||||
"rating" : text.parse_float(extr('"ratingValue": "', '"')),
|
"birthplace": text.unescape(extr('"bplace":"', '"')),
|
||||||
"celebrity" : text.unescape(extr("times'>", "</h1>")),
|
"birthday" : text.parse_datetime(text.unescape(
|
||||||
"shoesize" : text.remove_html(extr("Shoe Size:", "edit")),
|
extr('"bdate":"', '"'))[:10], "%Y-%m-%d"),
|
||||||
"birthplace": text.remove_html(extr("Birthplace:", "edit")),
|
"shoesize" : text.unescape(extr('"ssize":', ',')),
|
||||||
"birthday" : text.parse_datetime(text.remove_html(
|
"rating" : text.parse_float(extr('"score":', ',')),
|
||||||
extr("Birth Date:", "edit")), "%Y-%m-%d"),
|
"celebrity" : text.unescape(extr('"cname":"', '"')),
|
||||||
}
|
}
|
||||||
|
|
||||||
def images(self, page):
|
def images(self, page):
|
||||||
@@ -61,5 +61,6 @@ class WikifeetGalleryExtractor(GalleryExtractor):
|
|||||||
for tag in data["tags"] if tag in tagmap
|
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":[', '],') + "]")
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ __tests__ = (
|
|||||||
"pid" : int,
|
"pid" : int,
|
||||||
"width" : int,
|
"width" : int,
|
||||||
"height" : int,
|
"height" : int,
|
||||||
"shoesize" : r"re:\d+ US",
|
"shoesize" : r"re:\d+",
|
||||||
"type" : "women",
|
"type" : "women",
|
||||||
"tags" : list,
|
"tags" : list,
|
||||||
},
|
},
|
||||||
@@ -43,7 +43,7 @@ __tests__ = (
|
|||||||
"pid" : int,
|
"pid" : int,
|
||||||
"width" : int,
|
"width" : int,
|
||||||
"height" : int,
|
"height" : int,
|
||||||
"shoesize" : "12.5 US",
|
"shoesize" : "22",
|
||||||
"type" : "men",
|
"type" : "men",
|
||||||
"tags" : list,
|
"tags" : list,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -17,13 +17,13 @@ __tests__ = (
|
|||||||
|
|
||||||
"celeb" : "Tifa_Quinn",
|
"celeb" : "Tifa_Quinn",
|
||||||
"celebrity" : "Tifa Quinn",
|
"celebrity" : "Tifa Quinn",
|
||||||
"birthday" : "[NOT SET]",
|
"birthday" : "",
|
||||||
"birthplace": "United States",
|
"birthplace": "United States",
|
||||||
"rating" : float,
|
"rating" : float,
|
||||||
"pid" : int,
|
"pid" : int,
|
||||||
"width" : int,
|
"width" : int,
|
||||||
"height" : int,
|
"height" : int,
|
||||||
"shoesize" : "4 US",
|
"shoesize" : "5",
|
||||||
"type" : "women",
|
"type" : "women",
|
||||||
"tags" : list,
|
"tags" : list,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user