diff --git a/hexlib/web.py b/hexlib/web.py index f82867e..97b203f 100644 --- a/hexlib/web.py +++ b/hexlib/web.py @@ -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) diff --git a/setup.py b/setup.py index c7fc3c6..39139c3 100644 --- a/setup.py +++ b/setup.py @@ -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",