force referer when submitting a form
This commit is contained in:
parent
7edf5e488a
commit
04b7a9d572
1 changed files with 3 additions and 1 deletions
|
|
@ -322,7 +322,9 @@ class Form(OrderedDict):
|
||||||
"""
|
"""
|
||||||
Get the Request object from the form.
|
Get the Request object from the form.
|
||||||
"""
|
"""
|
||||||
return requests.Request(self.method, self.url, data=self)
|
req = requests.Request(self.method, self.url, data=self)
|
||||||
|
req.headers.setdefault('Referer', self.page.url)
|
||||||
|
return req
|
||||||
|
|
||||||
def submit(self):
|
def submit(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue