|
16 | 16 | from py_common import graphql, log |
17 | 17 | from py_common.deps import ensure_requirements |
18 | 18 | from py_common.types import ScrapedGallery, ScrapedMovie, ScrapedPerformer, ScrapedScene |
19 | | -from py_common.util import dig, guess_nationality, is_valid_url, scraper_args |
| 19 | +from py_common.util import dig, guess_nationality, feet_to_cm, lb_to_kg, is_valid_url, scraper_args |
20 | 20 | ensure_requirements("algoliasearch", "bs4:beautifulsoup4", "requests") |
21 | 21 |
|
22 | 22 | from algoliasearch.search.client import SearchClientSync |
@@ -191,9 +191,11 @@ def to_scraped_performer(performer_from_api: dict[str, Any], site: str) -> Scrap |
191 | 191 | if alternate_names := dig(performer_from_api, "attributes", "alternate_names"): |
192 | 192 | performer["aliases"] = alternate_names.strip() |
193 | 193 | if height := dig(performer_from_api, "attributes", "height"): |
194 | | - performer["height"] = height.strip() |
| 194 | + performer["height"] = feet_to_cm(height.strip()) |
195 | 195 | if weight := dig(performer_from_api, "attributes", "weight"): |
196 | | - performer["weight"] = weight.strip() |
| 196 | + performer["weight"] = lb_to_kg(weight.strip()) |
| 197 | + if endowment := dig(performer_from_api, "attributes", "endowment"): |
| 198 | + performer["penis_length"] = feet_to_cm("0'" + endowment.strip()) |
197 | 199 | if home := dig(performer_from_api, "attributes", "home"): |
198 | 200 | performer["country"] = guess_nationality(home.strip()) |
199 | 201 | if performer_from_api.get("has_pictures") and (pictures := performer_from_api.get("pictures")): |
|
0 commit comments