From 341b7a5f2a4ff900242b7847389d7f6caf28fe2e Mon Sep 17 00:00:00 2001 From: dvschuyl Date: Tue, 11 Mar 2025 11:05:14 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Truncate=20width=20to=20integer?= =?UTF-8?q?=20string=20in=20parse=5Fsrcset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crawl4ai/content_scraping_strategy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawl4ai/content_scraping_strategy.py b/crawl4ai/content_scraping_strategy.py index 46761013..a7c51dd0 100644 --- a/crawl4ai/content_scraping_strategy.py +++ b/crawl4ai/content_scraping_strategy.py @@ -48,7 +48,7 @@ def parse_srcset(s: str) -> List[Dict]: if len(parts) >= 1: url = parts[0] width = ( - parts[1].rstrip("w") + parts[1].rstrip("w").split('.')[0] if len(parts) > 1 and parts[1].endswith("w") else None )