mirror of
https://github.com/Jylpah/blitz-tools.git
synced 2026-11-23 06:04:18 +01:00
Fix
This commit is contained in:
1 parent
691deb7c80
commit
2603c1611c
1 file changed
+1
-2
+1
-2
@@ -263,7 +263,6 @@ async def get_url_JSON(session: aiohttp.ClientSession, url: str, chk_JSON_func =
|
|||||||
## To avoid excessive use of servers
|
## To avoid excessive use of servers
|
||||||
for retry in range(1,max_tries+1):
|
for retry in range(1,max_tries+1):
|
||||||
try:
|
try:
|
||||||
await asyncio.sleep(SLEEP)
|
|
||||||
async with session.get(url) as resp:
|
async with session.get(url) as resp:
|
||||||
if resp.status == 200:
|
if resp.status == 200:
|
||||||
debug('HTTP request OK')
|
debug('HTTP request OK')
|
||||||
@@ -275,7 +274,7 @@ async def get_url_JSON(session: aiohttp.ClientSession, url: str, chk_JSON_func =
|
|||||||
if retry == max_tries:
|
if retry == max_tries:
|
||||||
break
|
break
|
||||||
debug('Retrying URL [' + str(retry) + '/' + str(max_tries) + ']: ' + url )
|
debug('Retrying URL [' + str(retry) + '/' + str(max_tries) + ']: ' + url )
|
||||||
|
await asyncio.sleep(SLEEP)
|
||||||
|
|
||||||
except aiohttp.ClientError as err:
|
except aiohttp.ClientError as err:
|
||||||
debug("Could not retrieve URL: " + url)
|
debug("Could not retrieve URL: " + url)
|
||||||
|
|||||||
Reference in new issue
Block a user