scitex_scholar.browser
- class scitex_scholar.browser.ScholarBrowserManager(browser_mode=None, auth_manager=None, chrome_profile_name=None, config=None)[source]
Bases:
BrowserMixinManages a local browser instance with stealth enhancements and invisible mode.
- __init__(browser_mode=None, auth_manager=None, chrome_profile_name=None, config=None)[source]
Initialize ScholarBrowserManager with invisible browser capabilities.
- Parameters:
auth_manager – Authentication manager instance
config (
ScholarConfig) – Scholar configuration instance
- async get_authenticated_browser_and_context_async(**context_options)[source]
Get browser context with authentication cookies and extensions loaded.
- Return type:
tuple[Browser,BrowserContext]
- async _new_context_async(browser, **context_options)[source]
Creates a new browser context with stealth options and invisible mode applied.
- Return type:
BrowserContext
- _verify_xvfb_running(_recursed=False)[source]
Verify Xvfb virtual display is running; auto-start if absent.
- async _load_auth_cookies_to_persistent_context_async()[source]
Load authentication cookies into the persistent browser context.
- async take_screenshot_async(page, path, timeout_sec=30.0, timeout_after_sec=30.0, full_page=False)[source]
Take screenshot without viewport changes.