MCPcopy Create free account

hub / github.com/10000ge10000/epic-kiosk / functions

Functions90 in github.com/10000ge10000/epic-kiosk

↓ 3 callersMethod_active_purchase_container
(page: Page)
app/services/epic_games_service.py:367
↓ 3 callersFunctionchat
(base_url: str, key: str, model: str, messages: list[dict[str, Any]], timeout: float)
scripts/siliconflow_model_benchmark.py:157
↓ 3 callersFunctionchunk
(tag: bytes, data: bytes)
scripts/siliconflow_model_benchmark.py:172
↓ 3 callersFunctionextract_json
(text: str)
scripts/siliconflow_model_benchmark.py:136
↓ 3 callersFunctionnuke_account_immediately
☢️ 核弹模式:等待进程死亡后,执行双重删除 ⚠️ 重要:内部 API 调用必须禁用代理,否则会被 WARP 拦截导致 503 错误
worker.py:336
↓ 3 callersFunctionpng_data_url
(rgb: tuple[int, int, int], size: int = 48)
scripts/siliconflow_model_benchmark.py:168
↓ 2 callersFunction_call_openai_api
调用 OpenAI 兼容 API 注意:不使用 response_format,因为部分视觉模型不支持
app/settings.py:309
↓ 2 callersMethod_check_orders
(self)
app/services/epic_games_service.py:238
↓ 2 callersFunction_extract_json_from_response
从模型响应中提取 JSON(支持多种格式) 尝试顺序: 1. 直接解析整个响应 2. 提取 ```json 代码块 3. 提取 ``` 代码块 4. 提
app/settings.py:249
↓ 2 callersMethod_handle_device_not_supported_modal
Continue past Epic's intermediate unsupported-device modal.
app/services/epic_games_service.py:476
↓ 2 callersMethod_handle_right_account_validation
以下验证仅会在登录成功后出现 Returns:
app/services/epic_authorization_service.py:112
↓ 2 callersFunction_perform_physical_delete
执行彻底删除操作:数据库 + 物理文件夹 + Redis缓存
main.py:111
↓ 2 callersFunctionensure_warp_ready
确保 WARP 代理可用,必要时重启换 IP Returns: bool: WARP 是否可用
worker.py:133
↓ 2 callersFunctionlist_models
(base_url: str, key: str, query: str = "")
scripts/siliconflow_model_benchmark.py:111
↓ 2 callersFunctionpick_existing
(preferred: list[str], available: list[str], extra_rule=None, limit: int | None = None)
scripts/siliconflow_model_benchmark.py:123
↓ 2 callersFunctionrequest_json
(method: str, url: str, key: str, payload: dict[str, Any] | None = None, timeout: float = 30.0)
scripts/siliconflow_model_benchmark.py:86
↓ 2 callersFunctionrestart_warp_container
重启 WARP 容器以获取新 IP Returns: bool: 是否成功重启
worker.py:96
↓ 2 callersFunctionscrape_and_download_image
(game_title)
worker.py:257
↓ 2 callersFunctionvision_messages
(single: bool)
scripts/siliconflow_model_benchmark.py:207
↓ 1 callersMethod__init__
(self, page: Page)
app/services/epic_authorization_service.py:74
↓ 1 callersMethod_agree_license
(page: Page)
app/services/epic_games_service.py:358
↓ 1 callersFunction_apply_openai_compatible_patch
OpenAI 兼容 API 调用层。 默认使用 SiliconFlow: - Base URL: https://api.siliconflow.cn/v1 - API Key 获取地址: https://cloud.siliconflow.cn/i/OVI2n5
app/settings.py:146
↓ 1 callersFunction_convert_gemini_to_openai
将 Gemini 格式的 contents 转换为 OpenAI 格式的 messages 返回: (messages, has_images)
app/settings.py:179
↓ 1 callersMethod_empty_cart
(self, page: Page, wait_rerender: int = 30)
app/services/epic_games_service.py:629
↓ 1 callersMethod_handle_eula_correction
处理 EULA 修正页面 Epic Games 在某些情况下会将用户重定向到 EULA 修正页面: - 新注册账号首次登录 - Epic 更新服务条款 - 账号长期未登录 - 账号在新设备/地区登录
app/services/epic_games_service.py:134
↓ 1 callersMethod_handle_eula_correction
处理 EULA 修正页面 Epic Games 在某些情况下会将用户重定向到 EULA 修正页面: - 新注册账号首次登录 - Epic 更新服务条款 - 账号长期未登录 - 账号在新设备/地区登录
app/services/epic_authorization_service.py:275
↓ 1 callersMethod_handle_instant_checkout
(self, page: Page)
app/services/epic_games_service.py:516
↓ 1 callersMethod_login
执行登录流程 Returns: tuple[bool, ErrorType]: (是否成功, 错误类型) - (True, ErrorType.SUCCESS): 登录成功 - (False,
app/services/epic_authorization_service.py:134
↓ 1 callersMethod_purchase_free_game
(self)
app/services/epic_games_service.py:651
↓ 1 callersMethod_should_ignore_task
检查是否应该忽略任务 Returns: tuple[bool, GameCollectResult]: - (True, ALL_OWNED): 所有游戏已在库中,无需领取 -
app/services/epic_games_service.py:243
↓ 1 callersMethod_sync_order_history
(self)
app/services/epic_games_service.py:218
↓ 1 callersMethod_uk_confirm_order
(wpc: Any)
app/services/epic_games_service.py:508
↓ 1 callersMethodadd_promotion_to_cart
(self, page: Page, urls: List[str])
app/services/epic_games_service.py:554
↓ 1 callersFunctioncheck_warp_proxy
检测 WARP 代理是否可用 只检测代理连通性和出口 IP,不检测 Epic Games 因为 Epic 有 Cloudflare 挑战,需要浏览器才能通过 Returns: tuple[bool, str]: (是否成功, 错误信息或IP地址)
worker.py:48
↓ 1 callersFunctionclean_filename
(title)
worker.py:238
↓ 1 callersFunctionclean_game_title_for_search
(title)
worker.py:241
↓ 1 callersFunctionclean_user_profile
普通瘦身优化
worker.py:319
↓ 1 callersMethodcollect_epic_games
收集 Epic Games 周免游戏 Returns: GameCollectResult: 执行结果
app/services/epic_games_service.py:306
↓ 1 callersMethodcollect_weekly_games
(self, promotions: List[PromotionGame])
app/services/epic_games_service.py:672
↓ 1 callersFunctiondeploy
Main deployment function that executes Epic Games collection tasks. This function runs the collection process immediately and optionally
app/deploy.py:144
↓ 1 callersFunctionexecute_browser_tasks
Execute Epic Games free game collection tasks using browser automation. This function handles the complete workflow of authenticating with E
app/deploy.py:46
↓ 1 callersFunctionfetch_steam_cover
(game_title)
worker.py:245
↓ 1 callersFunctionget_promotions
获取周免游戏数据
app/services/epic_games_service.py:59
↓ 1 callersFunctioninit_app
()
app/extensions/ext_celery.py:15
↓ 1 callersFunctioninit_db
()
main.py:42
↓ 1 callersFunctioninit_log
初始化日志系统 控制台:精简输出,只显示关键信息 文件:按日期分类存储,保留 7 天
app/utils.py:112
↓ 1 callersMethodinvoke
执行 Epic 登录认证流程 流程: 1. 访问 Epic 免费游戏页面 2. 检测并处理 EULA 修正页面 3. 检查登录状态 4. 如果未登录,执行登录流程 5. 处理登录后的验
app/services/epic_authorization_service.py:425
↓ 1 callersFunctionis_discount_game
(prot: dict)
app/services/epic_games_service.py:61
↓ 1 callersFunctionis_verbose_traceback
过滤掉冗长的 Python 堆栈跟踪行和 Playwright 调试信息
worker.py:372
↓ 1 callersFunctionmain
()
scripts/siliconflow_model_benchmark.py:249
↓ 1 callersFunctionmain_loop
()
worker.py:769
↓ 1 callersFunctionmove_due_retry_tasks
把到期的延迟任务移动到主队列。
worker.py:219
↓ 1 callersFunctionread_env
(path: str = ".env")
scripts/siliconflow_model_benchmark.py:72
↓ 1 callersFunctionreport_success
向 Web 后端上报游戏领取成功记录 包含重试机制(最多3次),避免因网络波动导致记录丢失 ⚠️ 重要:内部 API 调用必须禁用代理,否则会被 WARP 拦截导致 503 错误
worker.py:276
↓ 1 callersFunctionrestart_warp_for_captcha_retry
验证码失败后按冷却时间重启 WARP,避免连续抖动代理。
worker.py:167
↓ 1 callersFunctionrun_task
(task_data)
worker.py:535
↓ 1 callersFunctionschedule_captcha_retry
把验证码失败任务放入 Redis 延迟队列,限制重试次数和节奏。
worker.py:193
↓ 1 callersFunctiontest_text
(base_url: str, key: str, model: str, timeout: float)
scripts/siliconflow_model_benchmark.py:183
↓ 1 callersFunctiontest_vision
(base_url: str, key: str, model: str, timeout: float)
scripts/siliconflow_model_benchmark.py:223
↓ 1 callersFunctiontranslate_log
汉化关键日志消息
worker.py:515
Method__init__
(self, page: Page)
app/services/epic_games_service.py:125
Method__init__
(self, page: Page)
app/services/epic_games_service.py:353
Method__init__
(self, error_type: ErrorType, message: str = "")
app/services/epic_authorization_service.py:66
Method_button_is_usable
(btn)
app/services/epic_games_service.py:412
Method_describe_buttons
(label: str, container: Any)
app/services/epic_games_service.py:421
Method_on_response_anything
(self, r: Response)
app/services/epic_authorization_service.py:81
Functionanti_abuse_middleware
(request: Request, call_next)
main.py:71
Functionconsole_filter
控制台过滤器:只显示关键日志 规则: 1. ERROR 及以上级别:始终显示 2. SUCCESS 级别:显示关键操作结果 3. WARNING 级别:显示重要警告 4. INFO 级别:只显示包含关键词的日志 5. DEBUG 级别:不显
app/utils.py:67
Functiondaily_job
()
main.py:272
Functiondelete_account
用户手动删除接口(需要验证密码)
main.py:199
Functiondeposit
提交任务接口 安全机制: 1. 检查是否有正在执行的任务 2. 验证已存储账号的密码(防止恶意覆盖) 3. 记录 IP 提交的账号数量(防止恶意刷量)
main.py:149
Functionget_free_games
从 Epic Games API 获取当前免费游戏列表 缓存 1 小时,避免频繁请求
main.py:370
Functionget_status
(email: str)
main.py:221
Functionget_system_stats
获取系统统计数据: - 托管账号总数 - 已验证账号数(有领取记录) - 今日领取数量 - 累计领取数量 - 系统运行时间
main.py:309
Methodhandle_captcha
处理验证码(如果需要)
app/services/epic_authorization_service.py:185
Functionnew_init
(self, *args, **kwargs)
app/settings.py:378
Functionnuke_account
(req: NukeRequest)
main.py:215
Functionpatched_generate
将 Gemini API 调用转换为 OpenAI API 调用 从响应中提取 JSON 代码块 支持模型自动切换(验证码任务 vs 普通任务)
app/settings.py:433
Functionpatched_upload
将文件内容存储到内存缓存,返回伪造的文件 ID
app/settings.py:406
Functionpush_task_to_redis
这才是真正把任务推进队列的函数,由调度器触发
main.py:266
Functionquery_logs
(account: QueryAccount)
main.py:239
Functionread_root
(request: Request)
main.py:144
Functionreport_game
(log: GameLog)
main.py:249
Functionsave_account
(account: Account)
main.py:230
Functionsignal_handler
(signum, frame)
app/deploy.py:202
Functionstart_scheduler
()
main.py:297
Functionstop_scheduler
()
main.py:302
Functiontimezone_filter
时区转换过滤器
app/utils.py:24
Methoduser_data_dir
(self)
app/settings.py:128
Methodwait_for_login_result
等待登录结果(成功或失败)
app/services/epic_authorization_service.py:181