close the session in save api interface

This commit is contained in:
Akash Mahanty 2022-01-23 18:34:06 +05:30
parent c0252edff2
commit 7844d15d99

View File

@ -66,9 +66,12 @@ class WaybackMachineSaveAPI:
) )
session.mount("https://", HTTPAdapter(max_retries=retries)) session.mount("https://", HTTPAdapter(max_retries=retries))
self.response = session.get(self.request_url, headers=self.request_headers) self.response = session.get(self.request_url, headers=self.request_headers)
self.headers = self.response.headers self.headers = (
self.response.headers
) # <class 'requests.structures.CaseInsensitiveDict'>
self.status_code = self.response.status_code self.status_code = self.response.status_code
self.response_url = self.response.url self.response_url = self.response.url
session.close()
def archive_url_parser(self): def archive_url_parser(self):
""" """