mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
fix
This commit is contained in:
parent
b8fe8bbc1d
commit
099fb4764d
@ -322,6 +322,9 @@ class Session:
|
|||||||
from network.winhttp.requester import Requester
|
from network.winhttp.requester import Requester
|
||||||
self._requester = Requester()
|
self._requester = Requester()
|
||||||
self._libidx = globalconfig["network"]
|
self._libidx = globalconfig["network"]
|
||||||
|
|
||||||
|
self.headers.update({"Accept-Encoding": self.requester.Accept_Encoding})
|
||||||
|
self.headers.update({"User-Agent": self.requester.default_UA})
|
||||||
return self._requester
|
return self._requester
|
||||||
|
|
||||||
def request(
|
def request(
|
||||||
@ -347,8 +350,6 @@ class Session:
|
|||||||
if cookies:
|
if cookies:
|
||||||
self.cookies.update(cookies)
|
self.cookies.update(cookies)
|
||||||
_h = self.headers.copy()
|
_h = self.headers.copy()
|
||||||
_h.update({"Accept-Encoding": self.requester.Accept_Encoding})
|
|
||||||
_h.update({"User-Agent": self.requester.default_UA})
|
|
||||||
if headers:
|
if headers:
|
||||||
_h.update(headers)
|
_h.update(headers)
|
||||||
response = self.requester.request(
|
response = self.requester.request(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user