diff --git a/openverse_catalog/dags/providers/provider_api_scripts/phylopic.py b/openverse_catalog/dags/providers/provider_api_scripts/phylopic.py index 6221347f2..f26ea681d 100644 --- a/openverse_catalog/dags/providers/provider_api_scripts/phylopic.py +++ b/openverse_catalog/dags/providers/provider_api_scripts/phylopic.py @@ -63,38 +63,6 @@ def get_should_continue(self, response_json): def get_batch_data(self, response_json): return response_json.get("_embedded", {}).get("items", []) - @staticmethod - def _get_image_info( - result: dict, uid: str - ) -> tuple[str | None, int | None, int | None]: - img_url = None - width = None - height = None - - image_info = result.get("pngFiles") - if image_info: - images = list( - filter(lambda x: (int(str(x.get("width", "0"))) >= 257), image_info) - ) - if images: - image = sorted(images, key=lambda x: x["width"], reverse=True)[0] - img_url = image.get("url") - if not img_url: - logging.warning( - "Image not detected in url: " - f"{PhylopicDataIngester._image_url(uid)}" - ) - else: - img_url = f"{PhylopicDataIngester.host}{img_url}" - width = image.get("width") - height = image.get("height") - - return img_url, width, height - - @staticmethod - def _image_url(uid: str) -> str: - return f"{PhylopicDataIngester.host}/image/{uid}" - @staticmethod def _get_image_sizes(data: dict) -> tuple[int | None, int | None]: width, height = None, None