 |
Forums |
Admin Discussion Forums: help Start New Thread
By: matt b
getting celerity json urls correctly [ reply ] 2011-11-23 06:18
|
hi guys,
i'm using celerity to automate work with Comet APE, which send javascript commands etc via JSON. I'm trying to retrieve them in celerity, but it seems like what i see in my normal browser - firebug console responses look like this:
[{"time":"1322026314","raw":"LOGIN","data":{"sessid":"6bb7a011fe4c092ce78bfa345dfa7a64"}},{"time":"1322026314","raw":"IDENT","data":{"user":{"casttype":"uni","pubid":"c72cda33ed65de72b5406eb1102f0e92","properties":{"name":"asdfasdf"}}}},{"time":"1322026314","raw":"CHANNEL","data":{"users":[{"casttype":"uni","pubid":"c72cda33ed65de72b5406eb1102f0e92","properties":{"name":"asdfasdf"},"level":1}],"pipe":{"casttype":"multi","pubid":"c2502f9735279ffbb927e3f597a0ba9d","properties":{"name":"updatechannel"}}}}]
this doesn't show up in the dom stack, even when i grab xml. There is some json string in the xml, but it never updates, it looks like this:
http://0.ape.ape-test.local:6969/?[{"cmd":"script","params":{"domain":"ape-test.local","scripts":["http://ape.ape-test.local/ape-jsf/Source/mootools-core.js","http://ape.ape-test.local/ape-jsf/Source/Core/APE.js","http://ape.ape-test.local/ape-jsf/Source/Core/Events.js","http://ape.ape-test.local/ape-jsf/Source/Core/Core.js","http://ape.ape-test.local/ape-jsf/Source/Pipe/Pipe.js","http://ape.ape-test.local/ape-jsf/Source/Pipe/PipeProxy.js","http://ape.ape-test.local/ape-jsf/Source/Pipe/PipeMulti.js","http://ape.ape-test.local/ape-jsf/Source/Pipe/PipeSingle.js","http://ape.ape-test.local/ape-jsf/Source/Request/Request.js","http://ape.ape-test.local/ape-jsf/Source/Request/Request.Stack.js","http://ape.ape-test.local/ape-jsf/Source/Request/Request.CycledStack.js","http://ape.ape-test.local/ape-jsf/Source/Transport/Transport.longPolling.js","http://ape.ape-test.local/ape-jsf/Source/Transport/Transport.SSE.js","http://ape.ape-test.local/ape-jsf/Source/Transport/Transport.XHRStreaming.js","http://ape.ape-test.local/ape-jsf/Source/Transport/Transport.JSONP.js","http://ape.ape-test.local/ape-jsf/Source/Core/Utility.js","http://ape.ape-test.local/ape-jsf/Source/Core/JSON.js"]}}]
putting the above string in my normal browser gives me something like this:
[{"time":"1322021118","raw":"ERR","data":{"code":"005","value":"BAD_JSON"}}]
my browser connection looks like this:
browser = Celerity::Browser.new(:browser => :firefox,:resynchronize=>true,:javascript_exceptions => true, :log_level => :all)
i'd appreciate any direction you can give on helping me grab the correct and updated JSON strings.
|
|
 |