def log(parse): if not ('wordExcelPdf_download' in parse._remote_url): return if getattr(parse, 'remote_response', ''): if getattr(parse.remote_response, 'headers', ''): U.pprint(parse.remote_response.headers) r = '=' * 99 U.log(r)
gsTitle = '- Yandex Browser' giClickY = 34 from qgb import py, Win, U, T, N, F # U=py.importU() from pywinauto import Application app = Application() pids = [i[0] for i in Win.getAllWindows() if i[1].endswith(gsTitle)] ws = [] for i in pids: i = app.Connect(handle=i) i = i.windows() for w in i: if w.WindowText().endswith(gsTitle): if w not in ws: ws.append(w) # F.dill_dump(obj=ws,file='browserGo_ws') U.pprint(U.il(ws)) if U.ct(ws) == 0: Win.setCurPos(giClickY, giClickY) def istop(): x, y = Win.getCurPos() if y > giClickY * 6 or y > ih - 9: U.pln(iw, ih, i, 'Cur:', x, y) U.exit() def click(w, x, y=giClickY): istop() try: w.Maximize() r = w.Rectangle()