add a helper utils.http.Client static object

This commit is contained in:
jesopo 2019-09-11 17:53:49 +01:00
parent 51dc26d113
commit 9d6a3982ed

View file

@ -227,6 +227,10 @@ def request_many(urls: typing.List[str]) -> typing.Dict[str, Response]:
return responses
class Client(object):
request = request
request_many = request_many
def strip_html(s: str) -> str:
return bs4.BeautifulSoup(s, "lxml").get_text()