How to make request through proxy in PyQt4

前端 未结 1 1947
旧时难觅i
旧时难觅i 2021-02-06 18:12

I want to make a request through a HTTP proxy, the thing is I don\'t really understand how to set it up.

Here is an example code:

#! /usr/bin/env python2         


        
1条回答
  •  粉色の甜心
    2021-02-06 18:59

    To use the QNetworkAccessManager subclass your created, add this code to your Browser

    old_manager = self.page().networkAccessManager()
    new_manager = MyNetworkAccessManager(old_manager)
    self.page().setNetworkAccessManager(new_manager)
    

    0 讨论(0)
提交回复
热议问题