aneesh2all / phoneyc

Automatically exported from code.google.com/p/phoneyc
0 stars 0 forks source link

cannot run phoney on the url I want #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
[toady@ellington phoneyc-buffer]$ python phoneyc.py
http://www.google.com/search?q=inurl%3A.asso.fr
/home/toady/scm/svn/phoneyc-buffer/HTTP/HttpHoneyClient.py:2:
DeprecationWarning: The popen2 module is deprecated.  Use the subprocess
module.
  import popen2
DEBUG: Switch tracing, now is 1.
http://www.google.com/search?q=inurl%3A.asso.fr
Error executing:
var
a=document.styleSheets[0],b=a.rules,c=document.getElementById("mbEnd"),d=documen
t.getElementById("tbd"),e=0;a.addRule(".s","width:auto");var
f=b[b.length-1].style;a.addRule("#cnt","width:auto");var
h=b[b.length-1].style;function i(){f.width=document.body.clientWidth-
(c?c.offsetWidth:0)-(d?d.offsetWidth:0)<=588?"auto":"544px";h.width=document.bod
y.clientWidth<=1050?"auto":"1050px";}window.attachEvent("onresize",function(){va
r
g=new Date;if(g-e>100){i();e=g}});i();

Traceback (most recent call last):
  File "/home/toady/scm/svn/phoneyc-buffer/DOM/PageParser.py", line 120, in
end_script
    self.__dict__['__window'].__dict__['__cx'].execute(self.script) #
execute script here
  File "<JavaScript>", line 2, in TypeError: window.attachEvent is not a
function
JSError: Error executing JavaScript.
Error executing:
var
a=document.styleSheets[0],b=a.rules,c=document.getElementById("mbEnd"),d=documen
t.getElementById("tbd"),e=0;a.addRule(".s","width:auto");var
f=b[b.length-1].style;a.addRule("#cnt","width:auto");var
h=b[b.length-1].style;function i(){f.width=document.body.clientWidth-
(c?c.offsetWidth:0)-(d?d.offsetWidth:0)<=588?"auto":"544px";h.width=document.bod
y.clientWidth<=1050?"auto":"1050px";}window.attachEvent("onresize",function(){va
r
g=new Date;if(g-e>100){i();e=g}});i();

Traceback (most recent call last):
  File "/home/toady/scm/svn/phoneyc-buffer/DOM/PageParser.py", line 120, in
end_script
    self.__dict__['__window'].__dict__['__cx'].execute(self.script) #
execute script here
  File "<JavaScript>", line 2, in TypeError: window.attachEvent is not a
function
JSError: Error executing JavaScript.
function () {
    var a = document.createElement("script");
    a.src =
"/extern_js/f/CgJlbiswCjhVQAgsKzAOOAssKzAWOBcsKzAXOAUsKzAYOAUsKzAZOBMsKzAlOMqIAS
wrMCY4CSwrMCc4BCwrMDw4AiwrMEA4CCwrMEQ4ASwrMEU4ASw/vJrDDY4k0O0.js";
    (document.getElementById("xjsd") || document.body).appendChild(a);
    if (google.timers && google.timers.load.t) {
        google.timers.load.t.xjsls = (new Date).getTime();
    }
}
function () {
    var a = document.createElement("script");
    a.src =
"/extern_js/f/CgJlbiswCjhVQAgsKzAOOAssKzAWOBcsKzAXOAUsKzAYOAUsKzAZOBMsKzAlOMqIAS
wrMCY4CSwrMCc4BCwrMDw4AiwrMEA4CCwrMEQ4ASwrMEU4ASw/vJrDDY4k0O0.js";
    (document.getElementById("xjsd") || document.body).appendChild(a);
    if (google.timers && google.timers.load.t) {
        google.timers.load.t.xjsls = (new Date).getTime();
    }
}
No ActiveXObject found.
Alerts:
[toady@ellington phoneyc-buffer]$ 

Original issue reported on code.google.com by sebastie...@gmail.com on 5 Feb 2010 at 5:03

GoogleCodeExporter commented 9 years ago
A simple workaround (still not committed) is adding this method to Window object

 98     def attachEvent(self, sEvent, fpNotify):
 99          print "********************* [WARNING] *************************"
100         print "No emulation available for window.attachEvent"
101         print "Event   : " + sEvent
102         print "Handler : " + str(fpNotify)
103         print 
"*************************************************************"

The idea is to simply avoid crashes like the ones seen by Sebastien. Right now I
don't know if more detailed emulation is needed for such method but the output 
could
help understanding if such need exists.

Original comment by angelo.d...@gmail.com on 8 Feb 2010 at 11:53

GoogleCodeExporter commented 9 years ago

Original comment by angelo.d...@gmail.com on 16 Jan 2011 at 10:58