def spynner_open(self, url, data=None, headers=None, method='GET', 
                     wait_for_text=None, wait_for_selector=None, tries=None):
        try:
            from PyQt4.QtNetwork import QNetworkAccessManager
        except ImportError:
            raise DependencyNotInstalledError('PyQt4')
        
        if wait_for_text is not None:
            def wait_callback(br):
                return wait_for_text in br.html
        elif wait_for_selector is not None:
            def wait_callback(br):
                return not br.webframe.findFirstElement(wait_for_selector).isNull()
        else:
            wait_callback = None
        
        operation = QNetworkAccessManager.GetOperation
        if method == 'POST':
            operation = QNetworkAccessManager.PostOperation
        self.br.load(url, wait_callback=wait_callback, tries=tries, 
                     operation=operation, body=data, headers=headers)
        
        return self.br
dataset/ETHPy150Open chineking/cola/cola/core/opener.py/SpynnerOpener.spynner_open/original