Fixed logic inside core.py for proxy error (#83)

* Fixed error where would attempt to fetch with proxy as empty string.

* Pushed change.
This commit is contained in:
Matt 2020-02-11 14:43:26 -05:00 committed by GitHub
parent 4d48dcbb34
commit e3e10310b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -435,7 +435,7 @@ async def fetch(session, url, params='', json=False, proxy="") -> Union[str, dic
async with session.get(url, params=params, proxy=proxy) as response:
return await response.text() if json is False else await response.json()
else:
async with session.get(url, proxy=proxy) as response:
async with session.get(url) as response:
await asyncio.sleep(2)
return await response.text() if json is False else await response.json()