youtube-channel-latest-video.workflow.json 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. {
  2. "schema_version": "workflow/v1",
  3. "workflow_key": "youtube-channel-latest-video",
  4. "name": "视觉点击:指定 YouTube 主播最新视频",
  5. "description": "打开指定 YouTube 主播的视频页,用多模态 AI 定位最靠前的公开视频封面或标题并点击播放。",
  6. "variables": {
  7. "channel_url": {
  8. "type": "string",
  9. "default": "https://www.youtube.com/@Google/videos",
  10. "description": "YouTube 主播视频页地址,建议使用 /videos 结尾"
  11. }
  12. },
  13. "settings": {
  14. "max_steps": 10,
  15. "default_timeout_ms": 120000,
  16. "on_unhandled_error": "pause_for_user",
  17. "return": {"node_id": "locate"}
  18. },
  19. "nodes": [
  20. {"id": "start", "type": "flow.start", "title": "开始", "position": {"x": 80, "y": 180}, "params": {}, "inputs": {}},
  21. {
  22. "id": "open",
  23. "type": "browser.open_url",
  24. "title": "打开主播视频页",
  25. "position": {"x": 300, "y": 180},
  26. "params": {"browser": "edge", "new_window": true},
  27. "inputs": {"url": {"source": "variable", "name": "channel_url"}}
  28. },
  29. {"id": "wait", "type": "wait.seconds", "title": "等待页面加载", "position": {"x": 540, "y": 180}, "params": {"seconds": 6}, "inputs": {}},
  30. {
  31. "id": "locate",
  32. "type": "vision.locate_element",
  33. "title": "AI 定位最新视频",
  34. "position": {"x": 780, "y": 180},
  35. "params": {
  36. "target_description": "定位 YouTube 主播视频列表中最新发布的普通公开视频,通常是视频网格中最靠左、最靠上、排在第一位的视频封面或标题中心。不要选择 Shorts、播放列表、频道头像、订阅按钮或导航标签。",
  37. "screen_context": "YouTube 主播 /videos 页面。",
  38. "randomize": false,
  39. "save_screenshot": true,
  40. "fail_if_not_found": true,
  41. "temperature": 0.1
  42. },
  43. "inputs": {}
  44. },
  45. {
  46. "id": "click",
  47. "type": "mouse.click",
  48. "title": "点击播放",
  49. "position": {"x": 1040, "y": 180},
  50. "params": {"button": "left", "clicks": 1, "duration": 0},
  51. "inputs": {
  52. "x": {"source": "node_output", "node_id": "locate", "output": "x"},
  53. "y": {"source": "node_output", "node_id": "locate", "output": "y"}
  54. }
  55. },
  56. {"id": "end", "type": "flow.end", "title": "结束", "position": {"x": 1280, "y": 180}, "params": {}, "inputs": {}}
  57. ],
  58. "edges": [
  59. {"id": "start_to_open", "kind": "control", "source": "start", "source_port": "next", "target": "open", "target_port": "run"},
  60. {"id": "open_to_wait", "kind": "control", "source": "open", "source_port": "success", "target": "wait", "target_port": "run"},
  61. {"id": "wait_to_locate", "kind": "control", "source": "wait", "source_port": "success", "target": "locate", "target_port": "run"},
  62. {"id": "locate_to_click", "kind": "control", "source": "locate", "source_port": "success", "target": "click", "target_port": "run"},
  63. {"id": "click_to_end", "kind": "control", "source": "click", "source_port": "success", "target": "end", "target_port": "run"}
  64. ]
  65. }