1
X-Forwarded-For
매개 변수를 내 헤더에 어떻게 추가 할 수 있습니까?PyQt4의 http 요청에서 X-Forwarded-For를 설정하는 방법
class MyBrowser(QWebPage):
''' Settings for the browser.'''
def __init__(self):
QWebPage.__init__(self)
def userAgentForUrl(self, url):
''' Returns a User Agent that will be seen by the website. '''
return "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.15 (KHTML, like Gecko) Chrome/24.0.1295.0 Safari/537.15"
내가 그런 짓을하는 것보다 :
class Browser(QWebView):
def __init__(self, user_info):
QWebView.__init__(self)
self.setPage(MyBrowser())
있어 당신이, 대단히 감사합니다 : 당신은 내가 파이썬 개발자 모르겠지만 C는 + +에서이 같은 것
void QNetworkRequest::setRawHeader (const QByteArray & headerName, const QByteArray & headerValue)
와 QNetworkRequest에 어떤 헤더를 설정할 수 있습니다 – Vor