Open takingurstuff opened 1 month ago
Can you launch single-file with the option --browser-headless=false
(or --browser-debug
) and check in the network tab in the DevTools if the images are downloaded or blocked. If they are blocked, can you tell me why? (CORS issue, 40x HTTP response...)
i launched it in headful and the resources downloaded and rendered properly. This happened on a Ubuntu remote machine i was running on. I did a few tests on my local mac machine and it turns out that pages downloaded with google chrome as a browser had all the images. So i just switched out the browser from chromium to google chrome on the linux machine, but the same still happened on linux. There was no problem with google chrome on macOS
here are images of the page sources for more context captured on linux: captured on mac:
both downloaded with same ver fo chrome in headful
the issue with the images happened on the highlighted lines
just out of curiosity, which OS is single-file-cli tested on?
That's a bit strange...
On my end, I do my tests mainly on macOS, and Windows 11. I can also do some tests easily on Asahi Linux and WSL. I do not have an Ubuntu machine, but I can run tests in a VM. At one time or another, I tested single-file-cli on all these environments.
anyways, i found out the issue only happens when i use the browser server options instead of doing the internal launching.
what is the difference between connecting to an external chrome vs an internally launched chrome, because i tested single file with the external chrome and the image was not downloaded but internally launched chrome downloaded absolutely fine.
I was using an edited version of single file cli to download a site, i checked the downloaded page and they have no images in them command used like follows
this is what single file downloaded the original page it is supposed to download looks like this:
I have set the signal to networkIdle because then everything will be loaded completed, i also added the delay as a failsafe in case the images still somehow failed to load, does this have something to do with the loadDeferredImages flag?
I changed it so that it scrolls after load to load some comments with the scroll
The edited version is avalaible at this fork:
https://github.com/takingurstuff/single-file-cli