(self, info)
| 25 | class RequestInterceptor(QWebEngineUrlRequestInterceptor): |
| 26 | |
| 27 | def interceptRequest(self, info): |
| 28 | url = info.requestUrl().toString() |
| 29 | if url.find('pos.baidu.com') > -1 and url.find('ltu=') > -1: |
| 30 | # 拦截百度联盟的广告 |
| 31 | print('block:', url) |
| 32 | info.block(True) |
| 33 | |
| 34 | |
| 35 | class Window(QWebEngineView): |
nothing calls this directly
no outgoing calls
no test coverage detected