-
Notifications
You must be signed in to change notification settings - Fork 200
A few improvements #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The page is often useful even if some background tracking script failed to load on time.
There could be some javascript that resizes components while we're waiting for "delay" - need to let it do the job.
Setting elementSelector should allow to selectively render page element (and its child elements), because the whole page is not that useful at times.
|
I successfully tested everything, but the element selector does not work: Traceback (most recent call last):
File "/home/sebastian/dev/python-webkit2png/webkit2png/scripts.py", line 206, in __main_qt
renderer.render_to_file(res=options.url, file_object=options.output)
File "/home/sebastian/dev/python-webkit2png/webkit2png/webkit2png.py", line 115, in render_to_file
image = self.render(res)
File "/home/sebastian/dev/python-webkit2png/webkit2png/webkit2png.py", line 100, in render
image = helper.render(res)
File "/home/sebastian/dev/python-webkit2png/webkit2png/webkit2png.py", line 263, in render
self._page.mainFrame().documentElement())
TypeError: 'str' object is not callableThe rest works fine! |
|
The |
|
@dotdoom could you please add documentation along with an example? that would be helpful I think |
|
@wagner-certat that would certainly be on my radar but I won't have cycles to get to it soon. In case you're interested here's one real life example: For that project I had to switch from QtWebKit to QWebEngine (Chromium) eventually, because the latter has much better support for the latest CSS and HTML features: https://github.com/dotdoom/comicsbot/blob/master/web2png.py |
|
I've switched to puppeteer meanwhile, closing this PR since I won't be able to follow up soon and it doesn't look to pick anyone else's interest. |
No description provided.