mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-20 23:56:34 -04:00
Moved screenshot code right after run_behavior
There were some weird screeshots when invoking `try_screenshot` in the end after `visit_hashtags` and `extract_outlinks`. The screenshot was distorted.
This commit is contained in:
parent
c007cda87e
commit
544222b021
@ -491,14 +491,14 @@ class Browser:
|
||||
page_url, behavior_parameters,
|
||||
behaviors_dir=behaviors_dir)
|
||||
self.run_behavior(behavior_script, timeout=behavior_timeout)
|
||||
if on_screenshot:
|
||||
self._try_screenshot(on_screenshot, screenshot_full_page)
|
||||
if skip_extract_outlinks:
|
||||
outlinks = []
|
||||
else:
|
||||
outlinks = self.extract_outlinks()
|
||||
if not skip_visit_hashtags:
|
||||
self.visit_hashtags(self.url(), hashtags, outlinks)
|
||||
if on_screenshot:
|
||||
self._try_screenshot(on_screenshot, screenshot_full_page)
|
||||
final_page_url = self.url()
|
||||
return final_page_url, outlinks
|
||||
except brozzler.ReachedLimit:
|
||||
|
Loading…
x
Reference in New Issue
Block a user