57 lines
2.0 KiB
Python
57 lines
2.0 KiB
Python
# This file was generated by Nuitka
|
|
|
|
# Stubs included by default
|
|
from __future__ import annotations
|
|
from playwright.sync_api import ElementHandle, sync_playwright
|
|
from typing import Any, Dict, List, Optional, Tuple
|
|
from typing_extensions import Self
|
|
import asyncio
|
|
import json
|
|
import logging
|
|
import os
|
|
import random
|
|
import time
|
|
|
|
class XianyuSliderStealth:
|
|
def __init__(self: Self, user_id: str, enable_learning: bool) -> None: ...
|
|
def init_browser(self: Self) -> Any: ...
|
|
def _load_success_history(self: Self) -> List[Dict[str, Any]]: ...
|
|
def _save_success_record(self: Self, trajectory_data: Dict[str, Any]) -> Any: ...
|
|
def _optimize_trajectory_params(self: Self) -> Dict[str, Any]: ...
|
|
def _get_cookies_after_success(self: Self) -> Any: ...
|
|
def _save_cookies_to_file(self: Self, cookies: Any) -> Any: ...
|
|
def _get_random_browser_features(self: Self) -> Any: ...
|
|
def _get_stealth_script(self: Self, browser_features: Any) -> Any: ...
|
|
def generate_human_trajectory(self: Self, distance: float) -> Any: ...
|
|
def simulate_slide(self: Self, slider_button: ElementHandle, trajectory: Any) -> Any: ...
|
|
def find_slider_elements(self: Self) -> Any: ...
|
|
def calculate_slide_distance(self: Self, slider_button: ElementHandle, slider_track: ElementHandle) -> Any: ...
|
|
def check_verification_success(self: Self, slider_button: ElementHandle) -> Any: ...
|
|
def check_page_changed(self: Self) -> Any: ...
|
|
def check_verification_failure(self: Self) -> Any: ...
|
|
def solve_slider(self: Self) -> Any: ...
|
|
def close_browser(self: Self) -> Any: ...
|
|
def run(self: Self, url: str) -> Any: ...
|
|
|
|
def process_user_url(user_id: str, url: str, enable_learning: bool) -> Any:
|
|
...
|
|
|
|
|
|
__name__ = ...
|
|
|
|
|
|
|
|
# Modules used internally, to allow implicit dependencies to be seen:
|
|
import time
|
|
import random
|
|
import logging
|
|
import asyncio
|
|
import json
|
|
import os
|
|
import playwright
|
|
import playwright.sync_api
|
|
import playwright.sync_api.sync_playwright
|
|
import playwright.sync_api.ElementHandle
|
|
import typing
|
|
import re
|
|
import sys |