MCPcopy Create free account

hub / github.com/WECENG/ticket-purchase / functions

Functions124 in github.com/WECENG/ticket-purchase

↓ 7 callersMethod_get_wait_time
根据快速模式获取等待时间
damai/concert.py:140
↓ 6 callersMethod_find_and_click_element
查找并点击包含指定文本的元素 Args: search_text: 要搜索的文本 max_results: 最大尝试结果数 skip_keywords: 需要跳过的关键词列表 print
damai/concert.py:1052
↓ 5 callersFunction_get_version_from_output
从命令输出中提取主版本号
damai/check_environment.py:15
↓ 5 callersFunction_run_command_get_version
运行命令并获取版本信息
damai/check_environment.py:21
↓ 4 callersMethod_select_option_by_config
根据配置列表选择选项 Args: config_list: 配置的选项列表(如日期、价格列表) element_list: 页面上的元素列表 skip_keywords: 需要跳过的关键词列表(如['无票',
damai/concert.py:259
↓ 3 callersFunction_find_chrome
查找 Chrome,返回 (path, version_str, major_version)。
damai/check_environment.py:151
↓ 3 callersFunction_get_chromedriver_paths
返回常见平台上的 ChromeDriver 候选路径。
damai/check_environment.py:83
↓ 3 callersMethod_is_order_confirmation_page
检查是否为订单确认页
damai/concert.py:146
↓ 3 callersMethod_scan_elements_by_class
扫描指定class的元素
damai/concert.py:1099
↓ 3 callersMethod_select_quantity_on_page
在详情页选择数量(PC端和移动端通用) Args: platform: 平台标识,用于日志输出
damai/concert.py:1317
↓ 3 callersMethodis_element_exist
:param element: 判断元素是否存在 :return:
damai/concert.py:109
↓ 3 callersMethodsmart_wait_and_click
智能等待和点击 - 支持备用选择器
damai_appium/damai_app_v2.py:127
↓ 3 callersMethodultra_fast_click
超快速点击 - 适合抢票场景
damai_appium/damai_app_v2.py:68
↓ 2 callersMethod_click_element_safe
安全地点击元素
damai/concert.py:131
↓ 2 callersMethod_get_element_text_safe
安全地获取元素文本
damai/concert.py:123
↓ 2 callersMethod_scan_elements
扫描指定类型的元素
damai/concert.py:346
↓ 2 callersMethod_setup_driver
初始化驱动配置
damai_appium/damai_app_v2.py:28
↓ 2 callersFunction_unique_paths
保持顺序去重,并忽略空路径。
damai/check_environment.py:38
↓ 2 callersMethodfinish
(self)
damai/concert.py:1563
↓ 2 callersFunctionget_version
从输出中提取版本号
damai/quick_diagnosis.py:14
↓ 2 callersMethodload_config
()
damai_appium/config.py:23
↓ 2 callersFunctionrun_command
运行命令并获取输出
damai/quick_diagnosis.py:20
↓ 1 callersMethod_click_plus_buttons
点击 + 按钮增加数量 Args: plus_btns: 按钮元素列表 target_count: 目标数量 Returns: bool: 是否成功
damai/concert.py:1387
↓ 1 callersFunction_get_chrome_paths
返回常见平台上的 Chrome 可执行文件候选路径。
damai/check_environment.py:50
↓ 1 callersMethod_get_quantity_input_value
获取数量输入框的值 Returns: str: 输入框的值,失败返回 None
damai/concert.py:1427
↓ 1 callersFunction_get_windows_chrome_version
Windows 上 chrome.exe --version 可能被已有会话吞掉,改从安装目录读取版本。
damai/check_environment.py:115
↓ 1 callersMethod_scan_page_info
扫描页面基本信息用于调试
damai/concert.py:322
↓ 1 callersMethod_scan_page_text
扫描页面文本内容
damai/concert.py:328
↓ 1 callersMethod_scan_submit_buttons
扫描提交按钮
damai/concert.py:709
↓ 1 callersMethod_scan_user_elements
扫描购票人相关元素(支持重试) Args: retry_count: 重试次数,默认 5 次 retry_interval: 重试间隔(秒),默认 0.5 秒 Returns: bool: 是
damai/concert.py:373
↓ 1 callersMethod_select_users
选择观演人员
damai/concert.py:668
↓ 1 callersMethod_submit_order
提交订单
damai/concert.py:827
↓ 1 callersMethod_try_select_quantity_by_buttons
通过点击 + 按钮选择数量 Args: target_count: 目标数量 Returns: bool: 是否成功选择
damai/concert.py:1354
↓ 1 callersMethod_try_select_user_method1
方法1: 查找并点击包含用户名的div
damai/concert.py:429
↓ 1 callersMethod_try_select_user_method2
方法2: 通过复选框和label选择
damai/concert.py:516
↓ 1 callersMethod_try_select_user_method3
方法3: 点击包含用户名的元素
damai/concert.py:568
↓ 1 callersMethod_try_select_user_method4
方法4: 使用JavaScript查找并点击
damai/concert.py:595
↓ 1 callersMethod_try_set_quantity_directly
直接设置输入框的值 Args: target_count: 目标数量 Returns: bool: 是否成功
damai/concert.py:1448
↓ 1 callersMethod_try_submit_by_class
方法4: 通过class查找
damai/concert.py:791
↓ 1 callersMethod_try_submit_by_original_xpath
方法5: 原有的XPath
damai/concert.py:814
↓ 1 callersMethod_try_submit_by_text
方法1-2: 通过元素文本查找
damai/concert.py:747
↓ 1 callersMethod_try_submit_by_view_name
方法3: 通过view-name属性查找
damai/concert.py:778
↓ 1 callersFunctioncheck_autoinstaller
检查自动安装器
damai/quick_diagnosis.py:99
↓ 1 callersFunctioncheck_chrome
检查 Chrome 浏览器
damai/quick_diagnosis.py:31
↓ 1 callersFunctioncheck_chromedriver
检查 ChromeDriver
damai/quick_diagnosis.py:50
↓ 1 callersFunctioncheck_config_file
检查配置文件是否存在和有效
damai/damai.py:17
↓ 1 callersMethodchoice_seat
(self)
damai/concert.py:249
↓ 1 callersMethodchoose_ticket
:return: 选票
damai/concert.py:157
↓ 1 callersMethodcommit_order
提交订单
damai/concert.py:844
↓ 1 callersMethodenter_concert
:return: 打开浏览器
damai/concert.py:94
↓ 1 callersFunctionget_chromedriver_path
获取 ChromeDriver 路径,如果不存在则自动安装。 供其他脚本导入使用。 :return: ChromeDriver 可执行文件路径
damai/check_environment.py:285
↓ 1 callersMethodget_cookie
:return: 读取cookie
damai/concert.py:62
↓ 1 callersFunctiongrab
()
damai/damai.py:91
↓ 1 callersFunctionload_config
()
damai/damai.py:72
↓ 1 callersMethodlogin
:return: 登录
damai/concert.py:79
↓ 1 callersFunctionmain
()
damai/quick_diagnosis.py:112
↓ 1 callersFunctionmain
()
damai/check_environment.py:358
↓ 1 callersFunctionmock_file_operations
Provide mocked file operations for tests.
tests/conftest.py:122
↓ 1 callersMethodrun_ticket_grabbing
执行抢票主流程
damai_appium/damai_app_v2.py:147
↓ 1 callersMethodrun_with_retry
带重试机制的抢票
damai_appium/damai_app_v2.py:262
↓ 1 callersMethodscan_page_elements
扫描页面元素,用于调试
damai/concert.py:1123
↓ 1 callersMethodselect_city_on_page
在页面选择城市(移动端)
damai/concert.py:1490
↓ 1 callersMethodselect_city_on_page_pc
在PC端详情页选择城市(支持模糊匹配)
damai/concert.py:1171
↓ 1 callersMethodselect_date_on_page
在页面选择场次(移动端)
damai/concert.py:1503
↓ 1 callersMethodselect_date_on_page_pc
在PC端详情页选择场次(支持模糊匹配)
damai/concert.py:1223
↓ 1 callersMethodselect_details_page_mobile
在移动端详情页完成所有选择:城市、场次、票价、数量(优化版:快速连续执行)
damai/concert.py:916
↓ 1 callersMethodselect_details_page_pc
在PC端详情页完成所有选择:城市、场次、票价、数量(优化版:快速连续执行)
damai/concert.py:962
↓ 1 callersMethodselect_price_on_page
在页面选择票价(移动端)
damai/concert.py:1522
↓ 1 callersMethodselect_price_on_page_pc
在PC端详情页选择票价(支持模糊匹配)
damai/concert.py:1269
↓ 1 callersMethodselect_quantity_on_page
在页面选择数量(移动端)
damai/concert.py:1559
↓ 1 callersMethodset_cookie
:return: 写入cookie
damai/concert.py:43
↓ 1 callersMethodultra_batch_click
超快批量点击 - 带等待机制
damai_appium/damai_app_v2.py:97
Method__init__
(self, server_url, keyword, users, city, date, price, price_index, if_commit_order)
damai_appium/config.py:12
Method__init__
(self)
damai_appium/damai_app_v2.py:22
Method__init__
(self, index_url, login_url, target_url, users, city, dates, prices, if_listen, if_commit_order, max_retries=1
damai/config.py:12
Method__init__
(self, config)
damai/concert.py:20
Method_click_element_by_text
通过文本内容点击元素 Args: text_content: 要查找的文本内容 tag_names: 要搜索的标签名列表,默认为['div', 'span', 'button'] exact_match: 是否
damai/concert.py:1013
Function_version_sort_key
(version)
damai/check_environment.py:111
Methodbatch_click
批量点击操作
damai_appium/damai_app_v2.py:88
Functioncheck_chrome
检查 Chrome 浏览器
damai/check_environment.py:205
Functioncheck_chromedriver
检查 ChromeDriver
damai/check_environment.py:222
Functioncheck_config_file
检查配置文件
damai/check_environment.py:323
Functioncheck_dependencies
检查依赖包
damai/check_environment.py:181
Functioncheck_python_version
检查 Python 版本
damai/check_environment.py:168
Functioncheck_version_match
检查 Chrome 和 ChromeDriver 版本是否匹配
damai/check_environment.py:246
Methodchoice_order
选择订单:包括场次、票档、人数
damai/concert.py:290
Functioncreate_test_file
(filename: str, content: str = "")
tests/conftest.py:124
Functionfake_exists
(path)
tests/unit/test_check_environment_windows.py:15
Functionfake_isdir
(path)
tests/unit/test_check_environment_windows.py:69
Functionfake_islink
(path)
tests/unit/test_check_environment_windows.py:35
Functionfake_listdir
(path)
tests/unit/test_check_environment_windows.py:64
Functionfake_version
(command)
tests/unit/test_check_environment_windows.py:18
Functionmock_appium_driver
Mock Appium driver for mobile tests.
tests/conftest.py:55
Functionmock_config
Provide a mock configuration for tests.
tests/conftest.py:21
Functionmock_selenium_driver
Mock Selenium WebDriver for unit tests.
tests/conftest.py:37
Functionmock_sleep
(seconds)
tests/conftest.py:96
Functionmock_time
Mock time-related functions for deterministic tests.
tests/conftest.py:87
Functionmock_time_func
()
tests/conftest.py:93
Functionpytest_collection_modifyitems
Modify test collection to add markers based on test location.
tests/conftest.py:147
Functionpytest_configure
Configure pytest with custom settings.
tests/conftest.py:133
next →1–100 of 124, ranked by callers