<div dir="ltr">Just to clarify - it works for 1 request but on subsequent requests the profile needs to be set again?<br><br>QWebChannel has similar "incredible" behavior.<br><br>it's a little incredible...QWebChannel behaves similarly <br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 9, 2016 at 8:43 AM, redstone-cold <span dir="ltr"><<a href="mailto:redstone-cold@163.com" target="_blank">redstone-cold@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><pre style="color:rgb(0,0,0);font-family:"Microsoft Yahei",微软雅黑,verdana;font-size:16px;font-stretch:normal;line-height:24px;padding:8px 10px;margin-top:0px;margin-bottom:0px"><span style="font-size:16px">That's incredible !</span></pre><pre style="font-stretch:normal;padding:8px 10px;margin-top:0px;margin-bottom:0px"><font face="Microsoft Yahei, 微软雅黑, verdana"><span style="line-height:24px;font-size:16px">I think the the interceptor was used by </span></font><span style="color:rgb(0,0,0);font-family:arial;line-height:normal;font-size:16px">profile</span><span style="color:rgb(102,102,102);font-family:arial;line-height:normal;font-size:16px">.</span><span style="color:rgb(0,0,0);font-family:arial;line-height:normal;font-size:16px">setRequestInterceptor(WebEngineUrlRequestInterceptor())</span><font face="Microsoft Yahei, 微软雅黑, verdana"><span style="line-height:24px;font-size:16px">, so it more or less was referenced by the </span></font><span style="color:rgb(0,0,0);font-family:arial;line-height:normal;font-size:16px">profile, and it on earth was</span><span style="color:rgb(0,0,0);font-family:arial;line-height:23.8px;font-size:16px"> garbage collected later, that just sounds </span><span style="font-size:16px">ridiculous!</span></pre><pre style="font-stretch:normal;padding:8px 10px;margin-top:0px;margin-bottom:0px"><span style="font-size:16px">Please help explain more, thanks !</span></pre></div><div style="color:rgb(0,0,0);font-family:arial;font-size:14px"><br></div><div style="color:rgb(0,0,0);font-family:arial;font-size:14px"><br></div><div style="color:rgb(0,0,0);font-family:arial;font-size:14px"><br></div></div><div><div><div>在2016年07月03 05时59分, "Phil Thompson"<<a href="mailto:phil@riverbankcomputing.com" target="_blank">phil@riverbankcomputing.com</a>>写道:</div><blockquote style="padding-left:1ex;margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)"><br><br>> On 2 Jul 2016, at 2:46 am, redstone-cold <<a href="mailto:redstone-cold@163.com" target="_blank">redstone-cold@163.com</a>> wrote:<br>> <br>> someone says  It may be caused by python garbage collection<br>> <a href="http://stackoverflow.com/questions/37658772/pyqt5-6-interceptrequest-doesnt-work" target="_blank">http://stackoverflow.com/questions/37658772/pyqt5-6-interceptrequest-doesnt-work</a><br>> <br>> P.S. I tried the solution , it worked . but I cannot figure out why, can you explain it ?<br><br>setRequestInterceptor() doesn't take ownership of the interceptor and you aren't keeping a reference (either implicit or explicit) to it so it gets garbage collected.<br><br>Phil<br><br>> 在2016年07月02 05时03分, "Florian Bruhin"<<a href="mailto:me@the-compiler.org" target="_blank">me@the-compiler.org</a>>写道:<br>> <br>> * redstone-cold <<a href="mailto:redstone-cold@163.com" target="_blank">redstone-cold@163.com</a>> [2016-06-30 13:16:48 +0800]:<br>> > In my project, there is some need to get a certain requested URL in Chrome Dev Tools by Python during loading a web page,<br>> > <br>> > I think get the URL by Qt WebEngine is a good solution. I started by trying to use the code below to print out all the requested URLs during loading a web page, <br>> > <br>> > my code here <a href="https://bpaste.net/show/f2b1b67bdf96" target="_blank">https://bpaste.net/show/f2b1b67bdf96</a><br>> > <br>> > but it didn't work - no URL get printed at all , so what's wrong here ? Any good solutions ?<br>> <br>> I finally got around to updating to Qt 5.7 and trying this, and it<br>> doesn't work here either.<br>> <br>> I really can't see why, it seems to me like it should work... did you<br>> find out anything in the meantime?<br>> <br>> Florian<br>> <br>> -- <br>> <a href="http://www.the-compiler.org" target="_blank">http://www.the-compiler.org</a> | <a href="mailto:me@the-compiler.org" target="_blank">me@the-compiler.org</a> (Mail/XMPP)<br>>   GPG: 916E B0C8 FD55 A072 | <a href="http://the-compiler.org/pubkey.asc" target="_blank">http://the-compiler.org/pubkey.asc</a><br>>         I love long mails! | <a href="http://email.is-not-s.ms/" target="_blank">http://email.is-not-s.ms/</a><br>> <br>> <br>>  <br>> _______________________________________________<br>> PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a><br>> <a href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br><br></blockquote></div></div><br>_______________________________________________<br>
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a><br>
<a href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" rel="noreferrer" target="_blank">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br></div></div>