MoneyPrinterV2 定时任务跳过 Post Bridge 交叉发布怎么排查【免费下载链接】MoneyPrinterV2Automate the process of making money online.项目地址: https://gitcode.com/GitHub_Trending/mo/MoneyPrinterV2MoneyPrinterV2 的定时任务src/cron.py在成功上传 YouTube Shorts 后才会调用 Post Bridge 把同一条视频交叉发布到 TikTok / Instagram。很多用户反馈“视频传上 YouTube 了但 TikTok 上没有”而手动运行时又正常。原因在于 cron 模式以非交互方式interactiveFalse执行不会弹出账号选择或“是否交叉发布”的确认框凡是交互流程里需要人工确认的地方cron 都直接跳过并打一条日志。排查时不必猜把 cron 的日志对照配置项逐项核对即可。本文只覆盖定时任务这一条链路。交互式运行main.py在上传成功后会询问是否交叉发布行为以 Post Bridge 文档 中 “Interactive YouTube flow” 一节为准。交叉发布的触发前提cron.py 中只有youtube.upload_video()返回成功才会调用maybe_crosspost_youtube_short()上传失败时打印YouTube upload failed. Skipping Post Bridge cross-post.交叉发布根本不会执行。Post Bridge 文档 也明确了这一点Cross-posting only runs afterupload_video()returns success.进入maybe_crosspost_youtube_short()post_bridge_integration.py后配置全部来自config.json的post_bridge块默认值见 get_post_bridge_config()enabled默认false、auto_crosspost默认false。也就是说如果你只是从 config.example.json 拷贝配置没有改动cron 每次都会跳过——这是“正常行为”不是 bug。按日志定位原因cron 模式下每一类跳过都有对应的输出均为源码中的实际日志文案见 post_bridge_integration.py。按出现频率从高到低核对日志原因处理完全没有 Post Bridge 相关日志post_bridge.enabled为falseL147-L148 直接静默返回把enabled设为truePost Bridge is enabled, but auto_crosspost is disabled. Skipping cross-post in cron mode.cron 模式下auto_crosspost为falseL179-L185把auto_crosspost设为trueMultiple Post Bridge accounts found for {platform}. Configure account_ids in config.json or run interactively.随后No Post Bridge accounts were resolved. Skipping cross-post.account_ids为空且该平台在 Post Bridge 中连接了多个账号cron 不会挂起等交互选择L64-L69在config.json中填入目标account_idsNo connected Post Bridge accounts found for {platform}.platforms里没有匹配到已连接账号L51-L53确认账号已在 Post Bridge 中连接且platforms与其一致Post Bridge is enabled but no API key is configured. Set post_bridge.api_key or POST_BRIDGE_API_KEY.api_key与POST_BRIDGE_API_KEY都为空L150-L155设置post_bridge.api_key或导出环境变量Post Bridge is enabled but no supported platforms are configured.platforms为空且account_ids也为空L163-L165配置platformsv1 仅支持tiktok、instagramYouTube upload failed. Skipping Post Bridge cross-post.cron.pyYouTube 上传本身失败交叉发布被连带跳过先解决上传问题Post Bridge 流程无从谈起如果日志显示Cross-posted via Post Bridge (post ID: ...)但平台侧没内容则属于 Post Bridge 服务端问题代码侧只会把 API 返回的warnings逐条打印Post Bridge warning: ...不在本项目排查范围内。修改配置确认原因后编辑项目根目录下的config.json修改post_bridge块完整配置说明见 Configuration.md{ post_bridge: { enabled: true, api_key: pb_your_api_key_here, platforms: [tiktok, instagram], account_ids: [], auto_crosspost: true } }auto_crosspost:true是 cron 链路自动交叉发布的开关交互运行时该值为false只会弹窗询问cron 则直接跳过account_ids: 留空时 cron 每次都要查询已连接账号某平台只有一个账号时自动选中多个则跳过。指定后直接使用这些 ID跳过账号查询PostBridge.md Configuration 一节。交互运行时选好的账号 ID 会打印出来供你复制到配置里程序不会替你改config.jsonapi_key: 留空时回退到环境变量POST_BRIDGE_API_KEYconfig.example.json 与 Configuration.md “Environment Variable Fallbacks” 一致。验证重新触发一次定时任务即可。cron 脚本按位置参数接收用途、账号 UUID 和 Ollama 模型名YouTube 链路的调用形式为参数含义见 cron.py 的文档字符串测试中也有同样用法见 test_cron_post_bridge.pypython src/cron.py youtube YouTube 账号 UUID ollama 模型名把YouTube 账号 UUID换成cache中该账号的 UUIDollama 模型名换成实际模型第三个参数必填缺失会报No Ollama model specified.并退出。把verbose设为true可以在日志中看到Initializing YouTube...、Uploaded Short.等辅助信息但 Post Bridge 的跳过/成功日志不受verbose控制始终会打印。成功的判定日志是Cross-posted via Post Bridge (post ID: Post Bridge 返回的 post ID).post ID来自 Post Bridge API 的返回每次不同不要把它当成固定值比对。边界说明以下行为在 v1 中是有意为之排查时不要当成故障PostBridge.md “Current v1 Behavior” 一节交叉发布的 caption 默认取生成的 YouTube 标题TikTok 额外把它作为title覆盖Instagram 封面图定制不包含在本集成内platforms中不支持的值会被静默忽略get_post_bridge_config() 只保留tiktok、instagram。【免费下载链接】MoneyPrinterV2Automate the process of making money online.项目地址: https://gitcode.com/GitHub_Trending/mo/MoneyPrinterV2创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
