mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-20 23:56:34 -04:00
Do not try to get a screenshot if status is 4xx, 5xx
The screenshot is an additional thing we do when the capture is successful. Why get a screenshot of 4xx/5xx responses? Its just extra system load. We already got the capture for archiving reasons.
This commit is contained in:
parent
b138b1e89b
commit
dc0f2a7455
@ -518,7 +518,8 @@ class Browser:
|
||||
behaviors_dir=behaviors_dir)
|
||||
self.run_behavior(behavior_script, timeout=behavior_timeout)
|
||||
final_page_url = self.url()
|
||||
if on_screenshot:
|
||||
if on_screenshot and self.websock_thread.page_status and \
|
||||
self.websock_thread.page_status < 400:
|
||||
self._try_screenshot(on_screenshot, screenshot_full_page)
|
||||
if not run_behaviors or skip_extract_outlinks:
|
||||
outlinks = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user