From 8fd296e1cc7160d5b53b9e1efc57d32e116140e5 Mon Sep 17 00:00:00 2001 From: "Oluwaseyi (Ekpere) Oyewunmi" Date: Fri, 16 Jan 2026 09:44:59 -0800 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9A=B0=EF=B8=8F=20Removed=20debug=20prin?= =?UTF-8?q?t=20statement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scrapfly/extraction_config.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scrapfly/extraction_config.py b/scrapfly/extraction_config.py index 5aeb922..4c270de 100644 --- a/scrapfly/extraction_config.py +++ b/scrapfly/extraction_config.py @@ -64,7 +64,6 @@ def __init__( ephemeral_template: Optional[Dict] = None ): if template: - print("WARNGING") warnings.warn( "Deprecation warning: 'template' is deprecated. Use 'extraction_template' instead." ) From 21f6c555a91cf556d8d2144143299551eaaa3300 Mon Sep 17 00:00:00 2001 From: "Oluwaseyi (Ekpere) Oyewunmi" Date: Fri, 16 Jan 2026 15:26:30 -0800 Subject: [PATCH 2/2] Fix mutable default argument for meta parameter, thereby preventing the common Python pitfall where a mutable default argument is shared across function calls. --- scrapfly/scrapy/request.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scrapfly/scrapy/request.py b/scrapfly/scrapy/request.py index 92b075d..8d2d2d5 100644 --- a/scrapfly/scrapy/request.py +++ b/scrapfly/scrapy/request.py @@ -20,9 +20,12 @@ class ScrapflyScrapyRequest(Request): # headers:Dict inherited # encoding:Dict inherited - def __init__(self, scrape_config: ScrapeConfig, meta: Dict = {}, *args, **kwargs): + def __init__(self, scrape_config: ScrapeConfig, meta: Optional[Dict] = None, *args, **kwargs): self.scrape_config = scrape_config + if meta is None: + meta = {} + meta['scrapfly_scrape_config'] = self.scrape_config super().__init__(