FIX : don't use self.user_agent if user_agent passed in get()

This commit is contained in:
Akash Mahanty 2021-01-05 19:31:27 +05:30 committed by GitHub
parent 28ff877081
commit 93b52bd0fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -317,7 +317,7 @@ class Url:
if not user_agent: if not user_agent:
user_agent = self.user_agent user_agent = self.user_agent
headers = {"User-Agent": self.user_agent} headers = {"User-Agent": str(user_agent)}
response = _get_response(url, params=None, headers=headers) response = _get_response(url, params=None, headers=headers)
if not encoding: if not encoding: