From 2ef02a0011bea6869fa9e3c7a33e03997a15ae18 Mon Sep 17 00:00:00 2001 From: Julian Date: Mon, 2 Sep 2019 22:50:39 +0100 Subject: [PATCH] Expose response data to generateFilename plugin event --- lib/scraper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scraper.js b/lib/scraper.js index 467b26d4..1dad5209 100644 --- a/lib/scraper.js +++ b/lib/scraper.js @@ -174,7 +174,7 @@ class Scraper { resource.setType(getTypeByMime(responseData.mimeType)); - const { filename } = await self.runActions('generateFilename', { resource }); + const { filename } = await self.runActions('generateFilename', { resource, responseData }); resource.setFilename(filename); // if type was not determined by mime we can try to get it from filename after it was generated