Files
Dorod-Sky/skyvern/constants.py

38 lines
1.1 KiB
Python
Raw Normal View History

2024-06-24 23:14:45 +08:00
from enum import StrEnum
from pathlib import Path
# This is the attribute name used to tag interactable elements
SKYVERN_ID_ATTR: str = "unique_id"
SKYVERN_DIR = Path(__file__).parent
REPO_ROOT_DIR = SKYVERN_DIR.parent
INPUT_TEXT_TIMEOUT = 120000 # 2 minutes
2024-07-03 17:17:24 +08:00
PAGE_CONTENT_TIMEOUT = 300 # 5 mins
2024-11-06 16:24:44 +08:00
BUILDING_ELEMENT_TREE_TIMEOUT_MS = 60 * 1000 # 1 minute
BROWSER_CLOSE_TIMEOUT = 180 # 3 minute
BROWSER_DOWNLOAD_MAX_WAIT_TIME = 1200 # 20 minute
2024-11-06 10:15:47 +08:00
BROWSER_DOWNLOAD_TIMEOUT = 600 # 10 minute
DOWNLOAD_FILE_PREFIX = "downloads"
SAVE_DOWNLOADED_FILES_TIMEOUT = 180
GET_DOWNLOADED_FILES_TIMEOUT = 30
2024-12-06 12:53:35 +08:00
NAVIGATION_MAX_RETRY_TIME = 5
AUTO_COMPLETION_POTENTIAL_VALUES_COUNT = 3
2025-01-08 14:27:50 +08:00
DROPDOWN_MENU_MAX_DISTANCE = 100
BROWSER_DOWNLOADING_SUFFIX = ".crdownload"
MAX_UPLOAD_FILE_COUNT = 50
2024-06-24 23:14:45 +08:00
# reserved fields for navigation payload
SPECIAL_FIELD_VERIFICATION_CODE = "verification_code"
2024-06-24 23:14:45 +08:00
class ScrapeType(StrEnum):
NORMAL = "normal"
STOPLOADING = "stoploading"
RELOAD = "reload"
2024-07-02 12:33:09 +08:00
SCRAPE_TYPE_ORDER = [ScrapeType.NORMAL, ScrapeType.NORMAL, ScrapeType.RELOAD]
DEFAULT_MAX_TOKENS = 100000
MAX_IMAGE_MESSAGES = 10
2025-05-01 00:09:49 -07:00
SCROLL_AMOUNT_MULTIPLIER = 100