gildas-lormeau / single-file-cli

CLI tool for saving a faithful copy of a complete web page in a single HTML file (based on SingleFile)
GNU Affero General Public License v3.0
644 stars 63 forks source link

Failed to run single-file-cli with headers #87

Closed yeger00 closed 6 months ago

yeger00 commented 6 months ago

Hello, I tried to run single-file-cli but failed to do. I keep getting the following error:

docker run singlefile --http-header "a=b" "https://www.wikipedia.org" > wikipedia.html

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Cannot read properties of undefined (reading 'trim')

By looking at the code I see that it probably fail here.

What am I missing? Thanks for the help

Avi

yeger00 commented 6 months ago

Figured it out I should do:

docker run singlefile --http-header="a=b" "https://www.wikipedia.org" > wikipedia.html
gildas-lormeau commented 6 months ago

Thank you, I confirm it was a bug ("https://www.wikipedia.org" was incorrectly interpreted as a header). It's fixed in the version 2.0.38 that I've just published.

yeger00 commented 6 months ago

Thanks @gildas-lormeau Much appreciated