def run(self, window): with PyV8.JSLocker(): dft = DFT.DFT(window) dft.run()
def run(self, window): dft = DFT.DFT(window) dft.run()
<div id="foo">bar</div> <script type="text/javascript"> document.write("f**k"); //$('#foo').html('mighty!'); $('#foo').html('mighty!'); var hasFlash = false; try { var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); if(fo) hasFlash = true; }catch(e){ alert(e); if(navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) hasFlash = true; } hasFlash;navigator.mimeTypes ["application/x-shockwave-flash"] </script> hi </body> </html> ''' log.ThugOpts.useragent = 'winxpchrome20' doc = w3c.parseString(html) window = Window.Window('about:blank', doc, personality=log.ThugOpts.useragent) window = window.open('http://adf.ly/IANxN') #window = window.open('http://streamcloud.eu/wo46kwbhow2c/Breaking.Bad.S02E11.Mandala.German.WS.DVDRiP.XviD-RSG.avi.html') dft = DFT.DFT(window) dft.run() print dft print type(window.doc) print window.doc