refactor(Playwright Engine): Separate what we can for cleaner code and the async function later
The caching will give a slight performance increase with bulk requests
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from .custom import (BaseFetcher, Response, StatusText, check_if_engine_usable,
|
||||
check_type_validity, do_nothing, get_variable_name)
|
||||
check_type_validity, do_nothing, do_nothing_async,
|
||||
get_variable_name)
|
||||
from .fingerprints import (generate_convincing_referer, generate_headers,
|
||||
get_os_name)
|
||||
from .navigation import (construct_cdp_url, construct_proxy_dict,
|
||||
|
||||
@@ -302,3 +302,8 @@ def check_type_validity(variable: Any, valid_types: Union[List[Type], None], def
|
||||
def do_nothing(page):
|
||||
# Just works as a filler for `page_action` argument in browser engines
|
||||
return page
|
||||
|
||||
|
||||
async def do_nothing_async(page):
|
||||
# Just works as a filler for `page_action` argument in browser engines
|
||||
return page
|
||||
|
||||
Reference in New Issue
Block a user