update refactoring and add new features
This commit is contained in:
@@ -43,29 +43,17 @@ from SYS import pipeline as pipeline_context
|
||||
# Playwright & Screenshot Dependencies
|
||||
# ============================================================================
|
||||
|
||||
from plugins.playwright import PlaywrightTimeoutError, PlaywrightTool
|
||||
from plugins.playwright import PlaywrightTimeoutError, PlaywrightTool, USER_AGENT
|
||||
|
||||
try:
|
||||
from SYS.config import resolve_output_dir
|
||||
except ImportError:
|
||||
try:
|
||||
_parent_dir = str(Path(__file__).parent.parent)
|
||||
if _parent_dir not in sys.path:
|
||||
sys.path.insert(0, _parent_dir)
|
||||
from SYS.config import resolve_output_dir
|
||||
except ImportError:
|
||||
resolve_output_dir = None
|
||||
resolve_output_dir = None
|
||||
|
||||
# ============================================================================
|
||||
# Screenshot Constants & Configuration
|
||||
# ============================================================================
|
||||
|
||||
USER_AGENT = (
|
||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
||||
"AppleWebKit/537.36 (KHTML, like Gecko) "
|
||||
"Chrome/120.0.0.0 Safari/537.36"
|
||||
)
|
||||
|
||||
DEFAULT_VIEWPORT: dict[str,
|
||||
int] = {
|
||||
"width": 1920,
|
||||
|
||||
Reference in New Issue
Block a user