fix(Fetchers/page_action): Fixing logic
This commit is contained in:
@@ -64,11 +64,14 @@ class CamoufoxEngine:
|
|||||||
self.addons = addons or []
|
self.addons = addons or []
|
||||||
self.humanize = humanize
|
self.humanize = humanize
|
||||||
self.timeout = check_type_validity(timeout, [int, float], 30000)
|
self.timeout = check_type_validity(timeout, [int, float], 30000)
|
||||||
if callable(page_action):
|
if page_action is not None:
|
||||||
self.page_action = page_action
|
if callable(page_action):
|
||||||
|
self.page_action = page_action
|
||||||
|
else:
|
||||||
|
self.page_action = None
|
||||||
|
log.error('[Ignored] Argument "page_action" must be callable')
|
||||||
else:
|
else:
|
||||||
self.page_action = None
|
self.page_action = None
|
||||||
log.error('[Ignored] Argument "page_action" must be callable')
|
|
||||||
|
|
||||||
self.wait_selector = wait_selector
|
self.wait_selector = wait_selector
|
||||||
self.wait_selector_state = wait_selector_state
|
self.wait_selector_state = wait_selector_state
|
||||||
|
|||||||
@@ -75,11 +75,14 @@ class PlaywrightEngine:
|
|||||||
self.cdp_url = cdp_url
|
self.cdp_url = cdp_url
|
||||||
self.useragent = useragent
|
self.useragent = useragent
|
||||||
self.timeout = check_type_validity(timeout, [int, float], 30000)
|
self.timeout = check_type_validity(timeout, [int, float], 30000)
|
||||||
if page_action is not None and callable(page_action):
|
if page_action is not None:
|
||||||
self.page_action = page_action
|
if callable(page_action):
|
||||||
|
self.page_action = page_action
|
||||||
|
else:
|
||||||
|
self.page_action = None
|
||||||
|
log.error('[Ignored] Argument "page_action" must be callable')
|
||||||
else:
|
else:
|
||||||
self.page_action = None
|
self.page_action = None
|
||||||
log.error('[Ignored] Argument "page_action" must be callable')
|
|
||||||
|
|
||||||
self.wait_selector = wait_selector
|
self.wait_selector = wait_selector
|
||||||
self.wait_selector_state = wait_selector_state
|
self.wait_selector_state = wait_selector_state
|
||||||
|
|||||||
Reference in New Issue
Block a user