def webview_loadFinished(self, result):
        print 'webview_loadFinished', result
        if result:
            save_to = os.path.join(PATH_TEMP, hashlib.sha1(self.url).hexdigest())
            with open(save_to, 'w') as f:
                print 'entry body write into %s' % save_to
                f.write(to_str(self.entry_body))

            # wget http://code.jquery.com/jquery-2.1.1.min.js
            path_jq = os.path.join(PWD, 'jquery-2.1.1.min.js')
            with open(path_jq) as f:
                js_code = f.read()
                self.webview.page().mainFrame().evaluateJavaScript(js_code)

            js_code = """$(document).ready(function(){
$('head').after('<b>hello jquery!</b>');
            });
            """
            self.webview.page().mainFrame().evaluateJavaScript(js_code)
dataset/ETHPy150Open shuge/Qt-Python-Binding-Examples/common_widgets/webview/brower_eval_custom_js.py/App.webview_loadFinished/original