This commit is contained in:
g1879 2020-09-03 18:01:59 +08:00
parent 470dd02ce7
commit f83d72a6fe

View File

@ -180,7 +180,7 @@ class SessionPage(object):
:param kwargs: 连接参数 :param kwargs: 连接参数
:return: url是否可用 :return: url是否可用
""" """
to_url = quote(url, safe='/:&?=%;#@') to_url = quote(url, safe='/:&?=%;#@+')
if not url or (not go_anyway and self.url == to_url): if not url or (not go_anyway and self.url == to_url):
return return
self._url = to_url self._url = to_url
@ -366,7 +366,7 @@ class SessionPage(object):
""" """
if mode not in ['get', 'post']: if mode not in ['get', 'post']:
raise ValueError("Argument mode can only be 'get' or 'post'.") raise ValueError("Argument mode can only be 'get' or 'post'.")
url = quote(url, safe='/:&?=%;#@') url = quote(url, safe='/:&?=%;#@+')
# 设置referer和host值 # 设置referer和host值
kwargs_set = set(x.lower() for x in kwargs) kwargs_set = set(x.lower() for x in kwargs)