Skip to content

Commit

Permalink
v1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
livelace committed Feb 15, 2021
1 parent 3516f53 commit 8967dae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webchela/core/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def fetch(self, urls) -> dict:
status = self.browser.execute_script('return document.readyState;')

if status == "complete":
handles_readiness[handle] = True
handles_readiness[index] = True
else:
ready = False

Expand All @@ -137,9 +137,9 @@ def fetch(self, urls) -> dict:
if not handles_readiness[index] and time_diff > self.request.browser.page_timeout:
try:
self.browser.execute_script("window.stop();")
handles_readiness[handle] = True
handles_readiness[index] = True
except:
handles_readiness[handle] = True
handles_readiness[index] = True

logger.warning("[{}][{}] Timeout during page content loading for URL: {}: {}s".format(
self.request.client_id, self.task_hash, url, time_diff))
Expand Down

0 comments on commit 8967dae

Please sign in to comment.