crawlee icon indicating copy to clipboard operation
crawlee copied to clipboard

duplicate file extension when saveSnapshot

Open clyer opened this issue 1 year ago • 0 comments

Which package is this bug report for? If unsure which one to select, leave blank

@crawlee/playwright (PlaywrightCrawler)

Issue description

  1. run saveSnapshot(page)
  2. expect SNAPSHOT.jpg saved, but got SNAPSHOT.jpg.jpeg. Also same issue with html file.

Key under which the screenshot and HTML will be saved. .jpg will be appended for screenshot and .html for HTML.

  1. The file name with extension has already been concatenated in playwright-utils, but in key-value-store, the extension is parsed based on "contentType" and concatenated again.

@crawlee/puppeteer has same issue.

Code sample

No response

Package version

3.4.0

Node.js version

16.15.1

Operating system

No response

Apify platform

  • [ ] Tick me if you encountered this issue on the Apify platform

I have tested this on the next release

No response

Other context

No response

clyer avatar Jul 13 '23 07:07 clyer