diff --git a/scrapypuppeteer/browser_managers/playwright_browser_manager.py b/scrapypuppeteer/browser_managers/playwright_browser_manager.py index 5c4a89c..1228e29 100644 --- a/scrapypuppeteer/browser_managers/playwright_browser_manager.py +++ b/scrapypuppeteer/browser_managers/playwright_browser_manager.py @@ -365,7 +365,7 @@ def compose(self, request: PuppeteerRequest): for action in request.action.actions: response = self.action_map[action.endpoint](request.replace(action=action)) - return response + return response.replace(puppeteer_request=request) def action(self, request: PuppeteerRequest): raise ValueError("CustomJsAction is not available in local mode") diff --git a/scrapypuppeteer/browser_managers/pyppeteer_browser_manager.py b/scrapypuppeteer/browser_managers/pyppeteer_browser_manager.py index b29d449..6998e0c 100644 --- a/scrapypuppeteer/browser_managers/pyppeteer_browser_manager.py +++ b/scrapypuppeteer/browser_managers/pyppeteer_browser_manager.py @@ -328,7 +328,7 @@ def compose(self, request: PuppeteerRequest): for action in request.action.actions: response = self.action_map[action.endpoint](request.replace(action=action)) - return response + return response.replace(puppeteer_request=request) def action(self, request: PuppeteerRequest): raise ValueError("CustomJsAction is not available in local mode") diff --git a/setup.py b/setup.py index 638ce36..b9b7750 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ def read_long_description(file_path): setup( name="scrapy-puppeteer-client", - version="0.3.7", + version="0.3.8", description="A library to use Puppeteer-managed browser in Scrapy spiders", long_description=read_long_description("README.md"), long_description_content_type="text/markdown",