### Proxy Server Configuration Example Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Example configuration for a proxy server, including hostname, port, and scheme. ```toml [proxy] hostname = "127.0.0.1" port = 1080 scheme = "socks5" ``` -------------------------------- ### Install Docker Compose Source: https://emby-keeper.github.io/guide/Linux-Docker-Compose-%E9%83%A8%E7%BD%B2 Installs the Docker Compose binary on Linux systems. Ensure you have curl and necessary permissions. ```bash curl -L "https://github.com/docker/compose/releases/download/v2.32.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose ``` -------------------------------- ### Install Embykeeper using pip Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E-PyPI-%E5%AE%89%E8%A3%85 Set up a virtual environment and install Embykeeper using pip. This is the recommended way to manage dependencies. ```bash python -m venv embykeeper-venv . ./embykeeper-venv/bin/activate pip install embykeeper ``` -------------------------------- ### MongoDB Connection String Example Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Example of a MongoDB connection string for cache storage. ```toml mongodb = "mongodb://username:password@localhost:27017/dbname" ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E%E6%BA%90%E7%A0%81%E6%9E%84%E5%BB%BA Clone the Embykeeper repository and install necessary dependencies to prepare for building and running the application. ```bash git clone https://github.com/emby-keeper/emby-keeper.git make install && make run ``` -------------------------------- ### Minimal Configuration Example Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E-PyPI-%E5%AE%89%E8%A3%85 A basic configuration for Telegram bot check-ins and Emby account details. Ensure you replace placeholder values with your actual credentials. ```toml # config.toml [[telegram.account]] phone = "+8612109347899" [[emby.account]] url = "https://weiss-griffin.com:443" username = "carrie19" password = "s*D7MMCpS$" ``` -------------------------------- ### Start Update Log Debugging Source: https://emby-keeper.github.io/guide/%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8F%82%E6%95%B0 Use the `--dump` or `-D` flag to initiate debugging of the raw update logs. ```bash embykeeper -D ``` -------------------------------- ### Configure Site Registration Interval Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Set up interval-based registration for a site using 'interval_minutes' under '[registrar.]'. This example configures 'templ_a' to attempt registration every 2 minutes. ```toml # 测试站点, 每2分钟间隔抢注 [registrar."templ_a"] interval_minutes = 2 ``` -------------------------------- ### Run Embykeeper After Configuration Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E%E6%BA%90%E7%A0%81%E6%9E%84%E5%BB%BA Command to run Embykeeper after initial setup and configuration. It will prompt for device verification. ```bash make run ``` -------------------------------- ### Proxy Connection Configuration Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E%E6%BA%90%E7%A0%81%E6%9E%84%E5%BB%BA Configuration example for Embykeeper including proxy settings for connecting through a proxy server. ```toml [proxy] hostname = "127.0.0.1" port = 1080 scheme = "socks5" [[telegram.account]] phone = "+8612109347899" [[emby.account]] url = "https://weiss-griffin.com:443" username = "carrie19" password = "s*D7MMCpS$" ``` -------------------------------- ### Minimal Configuration for Telegram and Emby Accounts Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E%E6%BA%90%E7%A0%81%E6%9E%84%E5%BB%BA A basic configuration file example showing how to set up both Telegram and Emby accounts for Embykeeper. ```toml # Download from here: https://github.com/emby-keeper/emby-keeper/blob/main/config.toml.example [[telegram.account]] phone = "+8612109347899" [[emby.account]] url = "https://weiss-griffin.com:443" username = "carrie19" password = "s*D7MMCpS$" ``` -------------------------------- ### Start Embykeeper with Docker Compose Source: https://emby-keeper.github.io/guide/Linux-Docker-Compose-%E9%83%A8%E7%BD%B2 Starts the Embykeeper service defined in the docker-compose.yml file in detached mode. Ensure you are in the directory containing the docker-compose.yml file. ```bash docker-compose up -d ``` -------------------------------- ### Modifying Default Site Configurations Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E%E6%BA%90%E7%A0%81%E6%9E%84%E5%BB%BA Example of how to add or remove sites from the default configuration for check-in, monitor, and messager functionalities. ```toml [site] checkiner = ["all", "-peach"] # 在全部可用站点基础上删除某些站点 monitor = ["+bgk", "-future"] # 在默认启用站点基础上增加或删除某些站点 messager = ["pornfans"] # 仅开启一个站点 [[telegram.account]] phone = "+8612109347899" ``` -------------------------------- ### Start Message Debugging Source: https://emby-keeper.github.io/guide/%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8F%82%E6%95%B0 Use the `--follow` or `-F` flag to initiate message debugging mode, focusing solely on message-related debugging. ```bash embykeeper -F ``` -------------------------------- ### Subsonic / Navidrome Server Configuration Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E%E6%BA%90%E7%A0%81%E6%9E%84%E5%BB%BA Configuration example for Embykeeper when using Subsonic or Navidrome servers, including time parameter. ```toml [[emby.account]] url = "https://weiss-griffin.com:443" username = "carrie19" password = "s*D7MMCpS$" [[subsonic.account]] url = "https://weiss-griffin.com:443" username = "carrie19" password = "s*D7MMCpS$" time = 10 ``` -------------------------------- ### Multiple Account Configuration Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E%E6%BA%90%E7%A0%81%E6%9E%84%E5%BB%BA Example configuration for Embykeeper demonstrating the use of multiple Telegram and Emby accounts. ```toml [[telegram.account]] phone = "+8618323433500" [[telegram.account]] phone = "+8615635499568" [[emby.account]] url = "https://jensen.biz/" username = "nbernard" password = "*%NO1K^tr#" [[emby.account]] url = "https://barnett.org/" username = "danielmartin" password = "2!8Mn9tpRT" ``` -------------------------------- ### Initial Docker Run for Cache Setup Source: https://emby-keeper.github.io/guide/Linux-Docker-Compose-%E9%83%A8%E7%BD%B2 Runs Embykeeper once to generate the cache.json file, which is required before setting up Docker Compose. This command mounts the current directory to /app and uses host networking. ```bash docker run -v $(pwd)/embykeeper:/app --rm -it --net=host embykeeper/embykeeper -i ``` -------------------------------- ### Emby / Jellyfin Watch Simulation Configuration Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E%E6%BA%90%E7%A0%81%E6%9E%84%E5%BB%BA Configuration example for Embykeeper focusing solely on Emby or Jellyfin server watch simulation. ```toml [[emby.account]] url = "https://weiss-griffin.com:443" username = "carrie19" password = "s*D7MMCpS$" ``` -------------------------------- ### Configure Site Registration Times Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Define specific daily times for timed registration using the 'times' option for each site under '[registrar.]'. Example shows 9:00 AM and 9:00 PM for 'templ_a'. ```toml # 西瓜Emby站点, 每天上午9点和晚上9点定时抢注 [registrar."templ_a"] times = ["9:00AM", "9:00PM"] ``` -------------------------------- ### Start History Analysis Debugging Source: https://emby-keeper.github.io/guide/%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8F%82%E6%95%B0 The `--analyze` or `-A` flag starts the historical information analysis debugging tool. ```bash embykeeper -A ``` -------------------------------- ### Docker Deployment with Command Line Arguments Source: https://emby-keeper.github.io/guide/%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8F%82%E6%95%B0 When using Docker, all trailing command-line arguments are passed directly to Embykeeper. This example shows how to enable Emby keep-alive (`-e`). ```bash docker run -v $(pwd)/embykeeper:/app --rm -it --net=host embykeeper/embykeeper -e ``` -------------------------------- ### Configure Specific Site Time Range and Interval Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Set an independent 'time_range' and 'interval_days' for specific sites. This example configures 'terminus' for a specific evening slot and 'templ_a' for an early morning slot. ```toml [checkiner.terminus] # 内置站点 time_range = "<11:00PM,11:30PM>" # Terminus 在晚上 11:00-11:30 独立签到 interval_days = 2 # 每 2 天签到一次 [checkiner.'templ_a'] # 模板站点 name = "自定义站点" time_range = "<6:00AM,7:00AM>" # 早晨 6:00-7:00 独立签到 templ_panel_keywords = "签到面板" ``` -------------------------------- ### Add Specific Check-in Bots Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Use a plus sign prefix (e.g., '+charon') to explicitly add specific check-in bots. This example enables the default check-in bots and adds 'charon'. ```toml [site] checkiner = ["+charon"] # 开启默认的签到器, 加上 charon ``` -------------------------------- ### Display Embykeeper Help Source: https://emby-keeper.github.io/guide/%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8F%82%E6%95%B0 Run `embykeeper -h` to display the help message, which lists all available commands and their descriptions. ```bash embykeeper -h ``` -------------------------------- ### Start Embykeeper in tmux for Background Operation Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E-PyPI-%E5%AE%89%E8%A3%85 Use tmux to run Embykeeper in the background. Start a tmux session, run the Embykeeper command, and detach from the session. ```bash tmux ``` -------------------------------- ### 收集签到器日志 (Docker) Source: https://emby-keeper.github.io/guide/%E5%8F%82%E4%B8%8E%E5%BC%80%E5%8F%91 使用 Docker 版本收集签到过程的日志。与命令行版本类似,请确保在程序运行时手动进行一次成功的签到,然后进行第二次签到以显示'今日已签到'信息。 ```bash docker run -v $(pwd)/embykeeper:/app --rm -it --net=host embykeeper/embykeeper -D all@test_bot | tee log.json ``` -------------------------------- ### Telegram Bot Only Configuration Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E%E6%BA%90%E7%A0%81%E6%9E%84%E5%BB%BA Configuration example for Embykeeper focusing solely on Telegram bot functionalities. ```toml [[telegram.account]] phone = "+8612109347899" ``` -------------------------------- ### Create systemd Service for Auto-start Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E%E6%BA%90%E7%A0%81%E6%9E%84%E5%BB%BA Command to create a systemd user service for Embykeeper, enabling automatic startup on user login. ```bash make systemd ``` -------------------------------- ### Simulate Video Playback Source: https://emby-keeper.github.io/guide/%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8F%82%E6%95%B0 The `--play` or `-p` option allows you to simulate playing a video by providing its URL. This is useful for testing playback functionality. ```bash embykeeper -p ``` -------------------------------- ### Configure Templated Sign-in Bot (templ_a) Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Use `templ_a` to enable sign-in for bots that follow a general template. Configure specific settings like the bot's name and keywords for its main menu. ```toml [site] checkiner = ["templ_a"] ``` ```toml [site] checkiner = ["templ_a"] [checkiner.'templ_a'] name = "某某站点" templ_panel_keywords = "你好呀" ``` -------------------------------- ### Configure Site Monitoring with Template Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Use this template to create a monitor for a site that is not yet supported. It triggers a message when a specific user in a chat sends a command. ```toml [site] monitor = ["templ_b"] [monitor.'templ_b'] name = "全部群组从众" chat_follow_user = 5 ``` -------------------------------- ### Configure Telegram Bot Checkiner Settings Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Set up parameters for the Telegram bot checkiner, including time range, timeouts, retries, concurrency, and random start intervals. ```toml [checkiner] time_range = "<11:00AM,2:00PM>" timeout = 120 retries = 4 concurrency = 1 random_start = 60 ``` -------------------------------- ### Configure Subsonic Server Account Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Set up account details for one or more Subsonic servers within the '[subsonic.account]' list. This includes URL, username, password, and optional parameters like simulated playback time. ```toml [subsonic] time_range = "<11:00AM,2:00PM>" interval_days = "<7,12>" concurrency = 3 [[subsonic.account]] url = "https://subsonic.example.com/" username = "user" password = "pass" time = [120, 240] # 模拟收听的时长 (秒) ``` -------------------------------- ### Configure Specific Site Functions Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Enable specific functions for sites by listing them under the respective keys. Other functions will retain their default enabled sites. ```toml [site] checkiner = ["charon", "embyhub", "jms", "ljyy", "magic", "peach", "pornfans", "sssq", "terminus"] # (其他的将保持默认) ``` -------------------------------- ### Define AI Style Messages for Group Chat Bot Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Specify the style messages for the AI-powered group chat bot directly in the configuration. This guides the AI's response generation. ```toml [messager.'templ_b'] name = "某某站点" chat_name = "moumou_chat" style_messages = [ "大家好", "签到", ] ``` -------------------------------- ### Build Docker Image Source: https://emby-keeper.github.io/guide/%E5%8F%82%E4%B8%8E%E5%BC%80%E5%8F%91 Builds a Docker image from the cloned Embykeeper source code, tagging it as embykeeper/embykeeper. ```bash docker build ./embykeeper-src -t embykeeper/embykeeper ``` -------------------------------- ### Configure AI-Powered Group Chat Bot (Template B) Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Configure a bot that uses AI to generate messages based on chat context and a style guide. This is for unsupported sites that can be emulated with AI. ```toml [site] messager = ["templ_b"] [messager.'templ_b'] name = "某某站点智能水群" chat_name = "moumou_chat" msg_per_day = 100 min_msg_gap = 10 style_message_list = "pornemby-common-wl@v1.yaml" extra_prompt = "只能输出 8 字以上的回复:" ``` -------------------------------- ### 定义新的群组监控站点 Source: https://emby-keeper.github.io/guide/%E5%8F%82%E4%B8%8E%E5%BC%80%E5%8F%91 Python 代码示例,展示如何创建一个新的群组监控器类,继承自 `Monitor`。需要定义监控器名称、目标聊天名称、关键词正则表达式以及触发时执行的操作。 ```python from . import Monitor class DummyMonitor(Monitor): name = "Dummy" chat_name = "dummy_chat" chat_user = "dummy_bot" chat_keyword = r"邀请码:\s*(\w+)" chat_delay = 1 bot_username = "dummy_bot" async def on_trigger(self, message, key, reply): await self.client.send_message(self.bot_username, f"/invite {key}") ``` -------------------------------- ### Subsonic / Navidrome Server Configuration Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E-PyPI-%E5%AE%89%E8%A3%85 Configure Emby/Jellyfin and Subsonic/Navidrome accounts. Note the addition of the 'subsonic.account' entry with its specific parameters. ```toml # config.toml [[emby.account]] url = "https://weiss-griffin.com:443" username = "carrie19" password = "s*D7MMCpS$" [[subsonic.account]] url = "https://weiss-griffin.com:443" username = "carrie19" password = "s*D7MMCpS$" time = 10 ``` -------------------------------- ### Disable Specific Check-in Bots Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 To disable specific check-in bots, use a minus sign prefix (e.g., '-charon') within the 'checkiner' list. This example enables default check-in bots except for 'charon'. ```toml [site] checkiner = ["-charon"] # 开启默认的签到器, 除了 charon ``` -------------------------------- ### Docker Compose Configuration for Command Line Arguments Source: https://emby-keeper.github.io/guide/%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8F%82%E6%95%B0 In Docker Compose, command-line arguments for Embykeeper are specified within the `command` section of the `docker-compose.yml` file. This example sets the command to only enable Emby keep-alive (`-e`). ```yaml version: '3' services: embykeeper: container_name: embykeeper image: embykeeper/embykeeper command: '-e' restart: unless-stopped volumes: - ./embykeeper:/app network_mode: host ``` -------------------------------- ### Configure Smart PornFans Prompt Override Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Completely override the default prompts for smart PornFans group messaging by setting the `prompt` value. ```toml [messager.smart_pornfans] prompt = "xxxx" ``` -------------------------------- ### Emby/Jellyfin Account Configuration Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E8%87%AA%E5%8A%A8%E4%BF%9D%E6%B4%BB Configure Emby or Jellyfin accounts in the TOML file, specifying simulation time range, interval, concurrency, and individual account credentials. The 'time' option sets the duration of simulated playback in seconds. ```toml [emby] time_range = "<11:00AM,2:00PM>" interval_days = "<7,12>" concurrency = 3 [[emby.account]] url = "https://emby.example.com" username = "user" password = "pass" time = [300, 600] ``` -------------------------------- ### 本地开发环境设置 Source: https://emby-keeper.github.io/guide/%E5%8F%82%E4%B8%8E%E5%BC%80%E5%8F%91 用于在本地搭建 Embykeeper 开发环境的命令。执行此命令将创建虚拟环境并安装开发所需的依赖。 ```bash make develop ``` -------------------------------- ### Configure Registration Site Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E5%AE%9A%E6%97%B6%E6%8A%A2%E6%B3%A8 Specify the target registration sites by setting the `registrar` field within the `site` configuration section. The values should be the bot usernames. ```toml [site] registrar = ["templ_a"] ``` -------------------------------- ### Configure Telegram Account for Registration Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E5%AE%9A%E6%97%B6%E6%8A%A2%E6%B3%A8 Set up at least one Telegram account in the configuration file with the `registrar` option set to `true` to enable the registration functionality. ```toml [[telegram.account]] phone = "+8616401875896" registrar = true ``` -------------------------------- ### Configure Emby/Jellyfin Server Account Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Define settings for individual Emby or Jellyfin server accounts, including URL, username, password, and playback options like time range and concurrency. ```toml [[emby.account]] url = "https://emby.example.com" username = "user" password = "pass" time = [300, 600] ``` -------------------------------- ### Immediate Registration with -R Flag Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E5%AE%9A%E6%97%B6%E6%8A%A2%E6%B3%A8 Use the `-R` parameter for immediate, continuous registration against a specified bot. This functionality is only supported for Sakura_embyboss deployed bots. ```bash embykeeper config.toml -R XiguaEmbyBot ``` -------------------------------- ### Enable All Monitor Bots Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Configure the 'monitor' list with 'all' to enable all supported monitor bots. Similar to check-in bots, this only activates monitors for sites where a bot was previously enabled. ```toml [site] monitor = ["all"] // 开启全部支持的监控器 (实际仅会签到曾经启用过机器人的站点) ``` -------------------------------- ### 收集签到器日志 (命令行) Source: https://emby-keeper.github.io/guide/%E5%8F%82%E4%B8%8E%E5%BC%80%E5%8F%91 当 Emby 可能是邀请制 Emby 时,使用此命令收集签到过程的日志以帮助开发者调试。请确保在程序运行时手动进行一次成功的签到,然后进行第二次签到以显示'今日已签到'信息。 ```bash embykeeper config.toml -D all@test_bot | tee log.json ``` -------------------------------- ### Configure Smart PornFans Extra Prompt Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Add extra prompts to the default prompts for smart PornFans group messaging. ```toml [messager.smart_pornfans] extra_prompt = "请勿输出数字" ``` -------------------------------- ### Configure Custom Check-in for 'templ_a' Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E6%AF%8F%E6%97%A5%E7%AD%BE%E5%88%B0 Customize the 'templ_a' check-in template by providing keywords for the bot's main menu and the specific button to click for check-in. This allows fine-tuning the interaction with custom bots. ```toml [site] checkiner = ["templ_a"] [checkiner.'templ_a'] name = "某某站点" templ_panel_keywords = "你好呀" bot_checkin_button = "签到" use_button_answer = true ``` -------------------------------- ### 运行 Embykeeper 开发工具 Source: https://emby-keeper.github.io/guide/%E5%8F%82%E4%B8%8E%E5%BC%80%E5%8F%91 提供用于在本地开发环境中运行 Embykeeper 核心程序、Web 界面或启动调试服务的命令。 ```bash make run # 运行 embykeeper ``` ```bash make run/web # 运行 embykeeperweb ``` ```bash make debugpy # 使用 vscode 的远程调试连接到 embykeeper ``` -------------------------------- ### 自定义监控 - 增加新站点并配置通知 Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E7%BE%A4%E7%BB%84%E7%9B%91%E6%8E%A7 通过模板 `templ_a` 增加自定义站点,并配置监控名称、触发关键词、发送对象等。 ```toml [site] monitor = ["templ_a"] [monitor.'templ_a'] name = "某某站点" chat_name = "moumou_chat" chat_keyword = "开注啦" chat_user = "moumou_bot" send_immediately = true try_register_bot = "moumou_bot" ``` -------------------------------- ### Set Base Directory Source: https://emby-keeper.github.io/guide/%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8F%82%E6%95%B0 Use the `--basedir` or `-B` option to specify a custom location for account and model files. ```bash embykeeper -B /path/to/data ``` -------------------------------- ### Custom Check-in with Template 'templ_c' Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E6%AF%8F%E6%97%A5%E7%AD%BE%E5%88%B0 Enable custom check-ins using the 'templ_c' template for bots that require periodic registration attempts. This template allows specifying an interval for sending the '/start' command to check registration status. ```toml [site] checkiner = ["templ_c"] [checkiner.'templ_c'] interval = 6000 ``` -------------------------------- ### 禁用自动水群 Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E8%87%AA%E5%8A%A8%E6%B0%B4%E7%BE%A4 通过命令行参数禁用自动水群功能,同时启用其他功能。 ```bash embykeeper -i -c -e -m ``` -------------------------------- ### Configure Enabled Sites for Functions Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Specify which sites are enabled for checkiner, monitor, and messager functions. If a function is not specified, it will use the default enabled sites. ```toml [site] checkiner = ["charon", "embyhub", "jms", "ljyy", "magic", "peach", "pornfans", "sssq", "terminus"] monitor = ["bgk", "embyhub", "pornfans_answer", "pornfans_double", "pornfans_dragon_rain", "pornfans_nohp", "viper"] messager = ["pornfans"] ``` -------------------------------- ### Configure Detailed Site Monitoring Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 This configuration allows for more granular control over site monitoring, including specific chat names, keywords, and delays. ```toml [site] monitor = ["templ_b"] [monitor.'templ_b'] name = "某某站点" chat_name = "moumou_chat" chat_follow_user = 5 chat_keyword = "参与关键词:「(.*?)」" chat_delay = 5 allow_same_user = false ``` -------------------------------- ### Custom Check-in Site Configuration Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E-PyPI-%E5%AE%89%E8%A3%85 Define custom check-in sites with specific parameters like name and bot check-in command. This allows for integration with sites not natively supported. ```toml # config.toml [site] checkiner = ["templ_b"] # 在全部可用站点基础上删除某些站点 [checkiner.'templ_b'] name = "某某站点" bot_checkin_cmd = "/sign" [[telegram.account]] phone = "+8612109347899" ``` -------------------------------- ### 话术列表文件格式 Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E8%87%AA%E5%8A%A8%E6%B0%B4%E7%BE%A4 定义话术列表文件的格式,包括消息内容、发送概率、时间区间和星期限制。 ```yaml # 话术列表, 每行一条 messages: - 消息 1 - 消息 2 - ... # 发送概率 possibility: 1.0 # 发送时间区间限制 at: ['7:00', '9:00'] # 发送星期几限制, 可选 weekdays / weekends only: weekdays ``` -------------------------------- ### Record Update Logs Source: https://emby-keeper.github.io/guide/%E8%B0%83%E8%AF%95%E5%B7%A5%E5%85%B7 This tool allows real-time output of full update logs. You can specify which types of updates to log, such as messages or callbacks. ```bash $ embykeeper config.toml -D message -D callback ``` -------------------------------- ### Configure Site Check-in List Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E6%AF%8F%E6%97%A5%E7%AD%BE%E5%88%B0 Specify the sites for which Emby Keeper should perform daily check-ins using the `site.checkiner` configuration option. The site names should correspond to the English names listed in the 'Supported Sites' section. ```toml [site] checkiner = ["charon", "embyhub"] ``` -------------------------------- ### 配置监控站点 Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E8%87%AA%E5%8A%A8%E6%B0%B4%E7%BE%A4 通过配置文件中的 `site` 项指定需要监控的站点。 ```toml [site] messager = ["pornfans"] ``` -------------------------------- ### Emby Keeper 模拟 Fileball/Filebar 首次登陆日志 Source: https://emby-keeper.github.io/guide/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98 展示了 Fileball/Filebar 软件首次登陆 Emby 服务器时产生的日志信息,包括用户认证和会话管理。 ```log Info Server: http/1.1 POST http://‌‍‍example.com‌/emby/Users/AuthenticateByName. Source Ip: ‌‍1.1.1.1, Accept=*/*, Host=‌‍‍example.com‌, User-Agent=Fileball/1.3.30, Accept-Encoding=gzip, br, Accept-Language=zh-CN,zh-Hans;q=0.9, Content-Type=application/json, Content-Length=52, Cdn-Loop=cloudflare; loops=1, Cf-Connecting-Ip=1.1.1.1, Cf-Ipcountry=MU, Cf-Ray=123456-HKG, Cf-Visitor={"scheme":"https"}, X-Emby-Authorization=MediaBrowser Token=,Emby UserId=(每次登陆都会变),Client=Fileball,Device=ABC%E2%80%99s%20iPhone,DeviceId=(随设备变化),Version=1.3.30, X-Forwarded-For=‌‍1.1.1.1, X-Forwarded-Host=‌‍‍example.com‌, X-Forwarded-Port=443, X-Forwarded-Proto=https, X-Forwarded-Server=123456, X-Real-Ip=‌‍1.1.1.1 Info UserManager: Authentication request for user1 has succeeded. Info SessionManager: Reissuing access token: (每次登陆不会变) Info Server: http/1.1 Response 200 to ‌‍1.1.1.1. Time: 5ms. POST http://‌‍‍example.com‌/emby/Users/AuthenticateByName ``` -------------------------------- ### Emby Keeper 模拟 Fileball/Filebar 再次登陆并访问视频日志 Source: https://emby-keeper.github.io/guide/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98 展示了 Fileball/Filebar 软件在已认证后访问 Emby 服务器上的视频资源时产生的日志信息,包括使用 Token 进行请求。 ```log Server: http/1.1 GET http://‌‍‍example.com/emby/Videos/1234/AdditionalParts?Fields=PrimaryImageAspectRatio,UserData,CanDelete&IncludeItemTypes=Playlist,BoxSet&Recursive=true&SortBy=SortName. Source Ip: ‌‍‍1.1.1.1, Accept=*/*, Host=‌‍‍example.com, User-Agent=Fileball/1.3.30, Accept-Encoding=gzip, br, Accept-Language=zh-CN,zh-Hans;q=0.9, Cdn-Loop=cloudflare; loops=1, Cf-Connecting-Ip=1.1.1.1, Cf-Ipcountry=MU, Cf-Ray=123456-HKG, Cf-Visitor={"scheme":"https"}, X-Emby-Authorization=MediaBrowser Token=(发送的 token),Emby UserId=(登陆时的UserId),Client=Fileball,Device=ABC%E2%80%99s%20iPhone,DeviceId=(随设备变化),Version=1.3.30, X-Emby-Token=(发送的 token), X-Forwarded-For=‌‍‌1.1.1.1, X-Forwarded-Host=‌‍‍example.com, X-Forwarded-Port=443, X-Forwarded-Proto=https, X-Forwarded-Server=123456, X-Real-Ip=1.1.1.1 ``` -------------------------------- ### Emby Keeper 模拟 Fileball/Filebar 开始播放视频日志 Source: https://emby-keeper.github.io/guide/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98 展示了 Fileball/Filebar 软件在 Emby 服务器上开始播放视频时产生的日志信息,包括请求播放信息、下载视频流和更新播放状态。 ```log Server: http/1.1 POST http://‌‍example.com‌/emby/Items/1234/PlaybackInfo?AutoOpenLiveStream=false&IsPlayback=false&MaxStreamingBitrate=42000000&MediaSourceId=84466298f4e9d5135dee212204bbed3b&StartTimeTicks=0&UserId=35e7a33dbf1445958b0719747d1111fe. Source Ip: ‌‍1.1.1.1, UserAgent: Fileball/1.3.30 (发送若干条) Server: http/1.1 GET http://‌‍example.com‌/emby/videos/1234/original.mp4?DeviceId=(随设备变化)&MediaSourceId=84466298f4e9d5135dee212204bbed3b&PlaySessionId=02981190f6c44a02b3015b7bbd372511&api_key=‌52c91904f5ef4bae8cb075394a114e66‌. Source Ip: ‌‍‍1.1.1.1‌, Accept=*/*, Host=‌‍example.com‌, User-Agent=VLC/3.0.21 LibVLC/3.0.21, Accept-Encoding=gzip, br, Accept-Language=en_US, Cdn-Loop=cloudflare; loops=1, Cf-Connecting-Ip=1.1.1.1, Cf-Ipcountry=MU, Cf-Ray=123456-HKG, Cf-Visitor={"scheme":"https"}, X-Forwarded-For=‌‍‍1.1.1.1‌, X-Forwarded-Host=‌‍example.com‌, X-Forwarded-Port=443, X-Forwarded-Proto=https, X-Forwarded-Server=123456, X-Real-Ip=‌‍‍1.1.1.1‌ (发送若干条) Server: http/1.1 POST http://‌‍example.com‌/emby/Sessions/Playing. Source Ip: 1.1.1.1‌, UserAgent: Fileball/1.3.30 Server: http/1.1 POST http://‌‍example.com‌/emby/Sessions/Playing/Progress. Source Ip: 1.1.1.1‌, UserAgent: Fileball/1.3.30 (发送若干条) Server: http/1.1 POST http://‌‍example.com‌/emby/Sessions/Playing/Stopped. Source Ip: 1.1.1.1‌, UserAgent: Fileball/1.3.30 ``` -------------------------------- ### Manage Emby Cache Source: https://emby-keeper.github.io/guide/%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8F%82%E6%95%B0 Use the `--clean` or `-c` command to display or clear Emby simulation devices and login credentials cache. ```bash embykeeper -c ``` -------------------------------- ### 启用自动水群 Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E8%87%AA%E5%8A%A8%E6%B0%B4%E7%BE%A4 通过命令行参数启用自动水群功能。需要先启用全部功能,然后指定启用自动水群。 ```bash embykeeper -i -s ``` -------------------------------- ### Enable All Check-in Bots Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Use 'all' in the 'checkiner' list to enable all supported check-in bots. Note that this only activates bots for sites where a bot was previously enabled. ```toml [site] checkiner = ["all"] // 开启全部支持的签到器 (实际仅会签到曾经启用过机器人的站点) ``` -------------------------------- ### 定义新的签到器 (基础) Source: https://emby-keeper.github.io/guide/%E5%8F%82%E4%B8%8E%E5%BC%80%E5%8F%91 Python 代码示例,展示如何创建一个新的签到器类,继承自 `BotCheckin`。需要定义签到器名称、目标机器人用户名和验证码长度。 ```python from . import BotCheckin class DummyCheckin(BotCheckin): name = "Dummy" bot_username = "dummy_bot" bot_captcha_len = 4 ``` -------------------------------- ### Customizing Site Enablement Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E-PyPI-%E5%AE%89%E8%A3%85 Customize site enablement by adding or removing sites from the default list. Use '+' to add and '-' to remove specific sites. ```toml # config.toml [site] checkiner = ["all", "-peach"] # 在全部可用站点基础上删除某些站点 monitor = ["+bgk", "-future"] # 在默认启用站点基础上增加或删除某些站点 messager = ["pornfans"] # 仅开启一个站点 [[telegram.account]] phone = "+8612109347899" ``` -------------------------------- ### Custom Check-in Site Configuration Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E%E6%BA%90%E7%A0%81%E6%9E%84%E5%BB%BA Customizing a specific check-in site with a custom name and bot command in Embykeeper. ```toml [site] checkiner = ["templ_b"] # 在全部可用站点基础上删除某些站点 [checkiner.'templ_b'] name = "某某站点" bot_checkin_cmd = "/sign" [[telegram.account]] phone = "+8612109347899" ``` -------------------------------- ### Emby / Jellyfin Simulation Only Configuration Source: https://emby-keeper.github.io/guide/Linux-%E4%BB%8E-PyPI-%E5%AE%89%E8%A3%85 Configure only the Emby or Jellyfin account for simulated viewing. This is useful if you only need Embykeeper for Emby/Jellyfin services. ```toml # config.toml [[emby.account]] url = "https://weiss-griffin.com:443" username = "carrie19" password = "s*D7MMCpS$" ``` -------------------------------- ### Enable Daily Check-in via Command Line Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E6%AF%8F%E6%97%A5%E7%AD%BE%E5%88%B0 Use command-line flags to enable specific Emby Keeper features. The `-i` flag enables all features, while `-c` specifically enables daily check-in. ```bash embykeeper -i embykeeper -i -c embykeeper -i -e -m -s -r ``` -------------------------------- ### Docker Compose with Build Method Source: https://emby-keeper.github.io/guide/%E5%8F%82%E4%B8%8E%E5%BC%80%E5%8F%91 Configures Docker Compose to build the Embykeeper image directly from the local source code. ```yaml version: '3' services: embykeeper: container_name: embykeeper build: ./embykeeper-src restart: unless-stopped volumes: - ./embykeeper-data:/app network_mode: host ``` -------------------------------- ### 自定义监控 - 配置自动回复 Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E7%BE%A4%E7%BB%84%E7%9B%91%E6%8E%A7 通过模板 `templ_a` 配置自定义自动回复。当消息包含指定关键词时,将自动回复捕获的内容。 ```toml [site] monitor = ["templ_a"] [monitor.'templ_a'] name = "所有站点" chat_keyword = "参与关键词:「(.*?)」" send_immediately = true chat_reply = "$1" ``` -------------------------------- ### Configure Smart PornFans Message Count and Interval Source: https://emby-keeper.github.io/guide/%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 Set the daily message count and minimum interval for smart PornFans group messaging. ```toml [messager.smart_pornfans] msg_per_day = 100 # 每天发送 100 条消息 interval = 1800 # 两次水群之间最小间隔 (s) ``` -------------------------------- ### Enable Specific Embykeeper Modules Source: https://emby-keeper.github.io/guide/%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8F%82%E6%95%B0 Use module switches like `-c` (checkin), `-e` (emby), `-m` (monitor), `-s` (send), or `--subsonic` to enable only specific functionalities. If no switches are provided, all modules are enabled by default. ```bash embykeeper config.toml embykeeper config.toml -c embykeeper config.toml -c -s ``` -------------------------------- ### 定义新的签到器 (带按钮点击) Source: https://emby-keeper.github.io/guide/%E5%8F%82%E4%B8%8E%E5%BC%80%E5%8F%91 Python 代码示例,展示如何使用 `AnswerBotCheckin` 类,并在 `on_captcha` 函数中实现点击按钮来识别验证码的功能。如果按键失败,会进行重试。 ```python from . import AnswerBotCheckin class DummyCheckin(AnswerBotCheckin): .... async def on_captcha(self, message: Message, captcha: str): for l in captcha: try: await self.message.click(l) except ValueError: self.log.info(f'未能找到对应 "{l}" 的按键, 正在重试.') await self.retry() break ``` -------------------------------- ### 最小配置示例 Source: https://emby-keeper.github.io/guide/Windows-%E9%80%9A%E8%BF%87%E5%AE%89%E8%A3%85%E5%8C%85%E5%AE%89%E8%A3%85 此配置展示了 `config.toml` 的最小化设置,仅包含 Telegram 机器人签到和 Emby 账户信息。 ```toml [[telegram.account]] phone = "+8612109347899" [[emby.account]] url = "https://weiss-griffin.com:443" username = "carrie19" password = "s*D7MMCpS$" ``` -------------------------------- ### Enable All Features Source: https://emby-keeper.github.io/guide/%E5%8A%9F%E8%83%BD%E8%AF%B4%E6%98%8E-%E8%80%83%E6%A0%B8%E8%BE%85%E5%8A%A9 This command enables all features of Embykeeper, including group monitoring. ```bash embykeeper -i ```