Add cookiejar_filter_name

This commit is contained in:
simon987 2021-10-03 11:02:39 -04:00
parent b746a91281
commit 7ecd55a1c6
2 changed files with 9 additions and 1 deletions

View File

@ -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)

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup(
name="hexlib",
version="1.61",
version="1.62",
description="Misc utility methods",
author="simon987",
author_email="me@simon987.net",