6 ms·
IMGKit: Python library of HTML to IMG wrapper
- NKCSS 10y agoWhat would be a good reason to use this over PhantomJS?
- djm_ 10y agoIf you wanted a different engine: Webkit. Edit: I was mistaken, they both back to Webkit.
- NKCSS 10y agoPhantomJS is also WebKit...
- Keyframe 10y agoPython
- sunilkumarc 10y agoPhantomJS is a JavaScript API. This is a Python API.
- pmlnr 10y agoAs much as I despise the nodejs dependency hell, PhantomJS is a better solution when compared to wkhtml, so a Python-PhantomJS wrapper would be a significantly better product imho.
- NKCSS 10y agoPhantomJS has stand-alone binaries that you can just call from Python if you wanted.
- hackerboos 10y agoThat's all this project does.
- tyingq 10y agoAt least for screenshots, the headless support recently introduced into chrome might be the most straightforward solution, with the fewest pieces. Some detail: https://docs.google.com/document/d/1VTcYz4q_x0f1O5IVrvRX4u1DVd_K34IVUl1VULLTCWw/edit#heading=h.ndv831lc9uf0 https://docs.google.com/document/d/1VTcYz4q_x0f1O5IVrvRX4u1D...
- parceltape 10y agoI think the title of this is a bit misleading. It is a wrapper lib around the cli of wkhtmltopdf (which the GitHub repo states).
- mschuster91 10y agoOh god. wkhtmltopdf sucks on so many levels, Webkit itself being one of them as their fork is totally outdated... sometimes I really think about rewriting it using Chromium Embedded Framework.
- Jack0614 10y agoI found there is no python API of this feature, so I wrote it, this lib is based on ruby pdfkit
- hackerboos 10y agoYou're better off using PhantomJS to take screenshots. There's still no great solution for Flash if you have to support that. I did a lot of research on this previously.
- llccbb 10y agoCan this create/upsample an image to a specified resolution/zoom level? Say I want a 2000x5000 pixel image of the way a website looks when the window size is 400x1000. I looked through the manual but didn't see explicit examples.
- dr_zoidberg 10y agoIf it's jsut upsampling you could do that with PIL/Pillow, after saving the output image.
- minimaxir 10y agoNot if you want photos of how responsive layouts behave at higher resolutions.
- Jack0614 10y agoYou can see manual of wkhtmltoimage:)
- mertd 10y agoDoes the text remain text or does it become an image?
- lyschoening 10y agoHow well does this handle SVGs? I used PhantomJS for headless rendering before, but it didn't properly render SVG linear gradients.