39
40
41
42
43
44
45
46
47
48
49
|
parent.hooks["config_save"].append(self.apply)
self.apply()
# set new browser string in requests session
def apply(self):
ua = self.map.get(conf.useragent.lower(), self.map["default"])
if ua:
__print__(dbg.HTTP, "UserAgentSwitcher:", ua)
ahttp.session.headers.update({ "User-Agent": ua })
|
|
|
39
40
41
42
43
44
45
46
47
48
49
|
parent.hooks["config_save"].append(self.apply)
self.apply()
# set new browser string in requests session
def apply(self):
ua = self.map.get(conf.useragent.lower(), self.map["default"])
if ua:
log.HTTP("UserAgentSwitcher:", ua)
ahttp.session.headers.update({ "User-Agent": ua })
|