To capture more details on a Javascript website I tried increasing page_width/page_heigth or decreasing zoom. Yet I get no change in the resulting jpg file.
API docs
https://cloudconvert.com/api/v2/capture-website#capture-website-tasks
My request looks like:
curl -X POST https://api.cloudconvert.com/v2/capture-website -H Authorization: Bearer xyz -H Content-type: application/json -d '
{
"url": "https://zyx/",
"zoom": 0.5,
"output_format": "jpg"
}
'
The response from the API is:
{
"data": {
"id": "xyz",
"job_id": null,
"status": "waiting",
"credits": null,
"code": null,
"message": null,
"percent": 100,
"operation": "capture-website",
"engine": "chrome",
"engine_version": "112",
"result": null,
"created_at": "2023-08-18T20:56:56+00:00",
"started_at": null,
"ended_at": null,
"retry_of_task_id": null,
"copy_of_task_id": null,
"user_id": 12345,
"priority": -10,
"host_name": null,
"storage": "ceph-fra",
"depends_on_task_ids": [],
"links": {
"self": "https://api.cloudconvert.com/v2/tasks/xyz"
}
}
}
Is there a way to capture a larger screen?
Well first, I think you should try to contact the support since apparently the
zoomfeature doesn't work for you.But in the meantime, what you can try is to use a proxy which adds a
style="zoom: 0.5"to the page, so that CloudConvert sees a zoomed out page.I created an example of such proxy:
https://replit.com/@Drarig29/DezoomOnTheFly
And you can use it like this:
e.g. https://dezoomonthefly.drarig29.repl.co/0.5/https:/github.com/Drarig29
If that solution works for you, you will have to host it yourself. This replit doesn't run forever, you have to run it manually.
Note: This cannot work in all cases. Some websites use
content-security-policyheaders for some resources, so those resources will fail to load because of the customdezoomonthefly.drarig29.repl.codomain. This is normal, and you cannot bypass this security.