mirror of
https://github.com/simon987/hexlib.git
synced 2025-04-10 14:06:43 +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
|
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):
|
def url_query_value(url, arg, as_list=False):
|
||||||
qs = urlparse(url).query
|
qs = urlparse(url).query
|
||||||
parsed_qs = parse_qs(qs)
|
parsed_qs = parse_qs(qs)
|
||||||
|
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="hexlib",
|
name="hexlib",
|
||||||
version="1.61",
|
version="1.62",
|
||||||
description="Misc utility methods",
|
description="Misc utility methods",
|
||||||
author="simon987",
|
author="simon987",
|
||||||
author_email="me@simon987.net",
|
author_email="me@simon987.net",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user