PySide6.QtWebEngineCore.QWebEngineUrlRequestInterceptor¶
- class QWebEngineUrlRequestInterceptor¶
- The - QWebEngineUrlRequestInterceptorclass provides an abstract base class for URL interception.- Details- Implementing the - QWebEngineUrlRequestInterceptorinterface and installing the interceptor on the profile enables intercepting, blocking, and modifying URL requests before they reach the networking stack of Chromium.- You can install the interceptor on a profile via - setUrlRequestInterceptor()or- setUrlRequestInterceptor().- When using the Qt WebEngine Widgets Module , - acceptNavigationRequest()offers further options to accept or block requests.- Synopsis¶- Methods¶- def - __init__()
 - Virtual methods¶- Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Creates a new - QWebEngineUrlRequestInterceptorobject with- pas parent.- abstract interceptRequest(info)¶
- Parameters:
- info – - QWebEngineUrlRequestInfo
 
 - Reimplementing this virtual function makes it possible to intercept URL requests. This method will be stalling the URL request until handled. - infocontains the information about the URL request and will track internally whether its members have been altered.- Warning - All method calls to the profile on the main thread will block until execution of this function is finished.