python - spynner doesn't load XHR data -


I'm creating a script for monitoring a Reporting Services report via appears in HTML or Aksmelacteepiaraiveitest Depending on how the report process applies.

As a tool to check the page, I want to use the spinner, which works perfectly for HTML, but it seems that when the data comes through XHR I can not work it

The code for the exam is as follows:

  #! / Usr / bin / env python # - * - coding: UTF -8 - * - the __docformat__ = 'restructuredtext N' PyQt4.QtNetwork import QNetworkRequest, QNetworkAccessManager PyQt4.QtCore import QByteArray def load_page (br) from PyQt4.QtCore import QUrl Spynner import import import time from imported pyquery imported from sleep: retired = br.load_jquery (true) print retired return Br.html br = 'Japan' in browser Brosr (Dibg_levl = 4) br.load ( 'https://foobar.eu/newton/cgi-bin/cognos.cgi') br.create_webview () br.show () # br.load ( "https: // foobar.eu/newton/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/cc.xts&m_folder=iA37B5BBC0615469DA37767D2B6F1DCF1 ") # br.browse () Race = br.load (" https: // foobar.eu:443/newton/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object=/content/folder[@name= 'DMA admin Zone] / folder [@ name = '02. performance benchmark module] / folder [@ name = '1 report] / report [@ name =' Sikyuem_stast_f_stain__havi_ Lokpal_provo cessing_Final '] & amp; ui.name = CQM_Test_3_HTML_Heavy_Local_Processing_Final & amp; run.outputFormat = & amp; Run.prompt = true ", 1, Wait_callback = load_page) d = str (pyquery.PyQuery (br.html)) if d.find ("Japan") & gt; -1: Print 'We searched Japan!' Else: Print 'Japan is nowhere to be seen!' Sleep (10)  

The URL in the comment is a page that contains a link to the report. When I click on Report by Report (through XHP) However, I can not seem to work with scripting it

br.load_jquery does not always give anyone < / P>

As a help, I've added a part of the Spinner debug trace when I click on the link with the hand: In the firebug I clearly see the XHP ration with the string 'Japan' Can i .

What am I missing?

Changes the unchanged page-loaded function with the following code: / P> < Pre> def load_page (br): br.wait (5) return to bromm 'Japan'


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -