mirror of
https://github.com/simon987/hexlib.git
synced 2025-04-04 02:12:59 +00:00
Add cookiejar_filter_name
This commit is contained in:
parent
b746a91281
commit
7ecd55a1c6
@ -81,6 +81,14 @@ def cookiejar_filter(cj, pattern):
|
||||
return filtered_cj
|
||||
|
||||
|
||||
def cookiejar_filter_name(cj, pattern):
|
||||
filtered_cj = RequestsCookieJar()
|
||||
for c in cj:
|
||||
if re.match(pattern, c.name):
|
||||
filtered_cj.set_cookie(c)
|
||||
return filtered_cj
|
||||
|
||||
|
||||
def url_query_value(url, arg, as_list=False):
|
||||
qs = urlparse(url).query
|
||||
parsed_qs = parse_qs(qs)
|
||||
|
Loading…
x
Reference in New Issue
Block a user