Exemple #1
0
 def readMHT_(self, path):
     self.mht = MHTLoader(path)
     self.locationbox.setStringValue_(self.mht.fixupURL(self.mht.root))
     archive = self.mht.asWebArchive()
     print "Archvie", archive.description()
     open('/tmp/archive.webarchive', 'wb').write(archive.data().bytes())
     self.webview.mainFrame().stopLoading()
     self.webview.mainFrame().loadArchive_(archive)
Exemple #2
0
 def readMHT_(self, path):
     self.mht = MHTLoader(path)
     self.locationbox.setStringValue_(self.mht.fixupURL(self.mht.root))
     archive = self.mht.asWebArchive()
     print("Archive", archive.description())
     with open("/tmp/archive.webarchive", "wb") as fp:
         fp.write(archive.data().bytes())
     self.webview.mainFrame().stopLoading()
     self.webview.mainFrame().loadArchive_(archive)
     1 / 0