Update client.py

This commit is contained in:
Seraphim R.P 2020-06-24 14:49:06 -04:00 committed by GitHub
parent f4127b1008
commit 3bba5f1aff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,7 @@
import requests import requests
import sys import sys
import cloudscraper
class HTTPClient: class HTTPClient:
@ -35,7 +36,7 @@ class HTTPClient:
} }
url = f"{base_url}{path}" url = f"{base_url}{path}"
resp = self.session.request(method, url, headers=headers) resp = cloudscraper.create_scraper(sess=self.session).request(method, url, headers=headers)
exception_strings = { exception_strings = {
"400": "Bad Request", "400": "Bad Request",