'Resolve a PAC proxy from URL.
Args:
url: QUrl of a PAC proxy.'

def __init__(self, url, parent=None):

    super().__init__(parent)
    pac_prefix = 'pac+'
    assert url.scheme().startswith(pac_prefix)
    url.setScheme(url.scheme()[len(pac_prefix):])
    self._pac_url = url
    self._manager = QNetworkAccessManager()
    self._manager.setProxy(QNetworkProxy(QNetworkProxy.NoProxy))
    self._reply = self._manager.get(QNetworkRequest(url))
    self._reply.finished.connect(self._finish)
    self._pac = None
    self._error_message = None
