From 9d6a3982edf09b3ba46ca461dd46e8986d5f7621 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 11 Sep 2019 17:53:49 +0100 Subject: [PATCH] add a helper utils.http.Client static object --- src/utils/http.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/http.py b/src/utils/http.py index aa18747b..412ccce7 100644 --- a/src/utils/http.py +++ b/src/utils/http.py @@ -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()