spynner

Saving Files from a Loop Without Overwrite

天大地大妈咪最大 提交于 2020-01-06 01:32:10
问题 Currently my python script (which uses 'Spynner') has a loop which contains: browser.load(url) time.sleep(5) browser.snapshot().save('example.png') ...but the problem is that every time the loop cycles it overwrites the previously stored image with an image of the newly rendered URL (the URL changes each time the loop is run) instead of making a new image, separate from the previous one. I have created a count but for some reason: browser.snapshot().save((count)'.png') doesn't seem to work.

Python spynner and gtk3 issue

陌路散爱 提交于 2019-12-11 21:13:28
问题 I am always getting the following error on executing the script. I am trying to attach spynner window in a Gtk window. Is spynner will only works with gtk2?? import sys import spynner from BeautifulSoup import BeautifulSoup from gi.repository import Gtk, Gdk from gi.repository import GObject, GLib class App: def __init__(self): self.browser = spynner.Browser() self.create_interior() self.window.show_all() def create_interior(self): self.window = Gtk.Window() self.window.set_border_width(0)