scrapinghub / splash

Lightweight, scriptable browser as a service with an HTTP API
BSD 3-Clause "New" or "Revised" License
4.04k stars 508 forks source link

Dockercontainer with Chromium #1143

Open philippneugebauer opened 2 years ago

philippneugebauer commented 2 years ago

Hey,

the website I want to visit is not rendered with webkit since the website tells that there's no javascript.

So I tried to use Chromium with

docker run -it -p 8050:8050 scrapinghub/splash --max-timeout 5000 -v2 --disable-private-mode --browser-engines=chromium

Unfortunately, I always get the following answer:

{
    "error": 400,
    "type": "BadOption",
    "description": "Incorrect HTTP API arguments",
    "info": {
        "type": "bad_argument",
        "argument": "engine",
        "description": "Disabled render engine webkit"
    }
}

I've read in the docs, you need to enable it per request, but I couldn't find any other details about it.

yoonthegoon commented 1 year ago

This happens because you're disabling webkit and using the engine argument on the execute endpoint. engine is only a valid argument render.html. Try doing http://localhost:8050/render.html?wait=0.5&engine=chromium&url=https://github.com/scrapinghub/splash/issues/1143.