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