youtube-home-random-video.workflow.json 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. {
  2. "schema_version": "workflow/v1",
  3. "workflow_key": "youtube-home-random-video",
  4. "name": "视觉点击:随机 YouTube 首页推荐视频",
  5. "description": "打开真实浏览器中的 YouTube 首页,用多模态 AI 从当前账号首页推荐里随机定位一个可点击视频,再用鼠标点击播放。",
  6. "variables": {},
  7. "settings": {
  8. "max_steps": 10,
  9. "default_timeout_ms": 120000,
  10. "on_unhandled_error": "pause_for_user",
  11. "return": {"node_id": "locate"}
  12. },
  13. "nodes": [
  14. {"id": "start", "type": "flow.start", "title": "开始", "position": {"x": 80, "y": 180}, "params": {}, "inputs": {}},
  15. {
  16. "id": "open",
  17. "type": "browser.open_url",
  18. "title": "打开 YouTube 首页",
  19. "position": {"x": 300, "y": 180},
  20. "params": {"url": "https://www.youtube.com/", "browser": "edge", "new_window": true},
  21. "inputs": {}
  22. },
  23. {
  24. "id": "wait",
  25. "type": "wait.seconds",
  26. "title": "等待页面加载",
  27. "position": {"x": 540, "y": 180},
  28. "params": {"seconds": 6},
  29. "inputs": {}
  30. },
  31. {
  32. "id": "locate",
  33. "type": "vision.locate_element",
  34. "title": "AI 定位随机推荐视频",
  35. "position": {"x": 780, "y": 180},
  36. "params": {
  37. "target_description": "从当前 YouTube 首页可见的普通推荐视频中随机选择一个可点击的视频封面或标题中心。不要选择 Shorts、广告、频道头像、导航栏、搜索框、登录按钮或通知按钮。",
  38. "screen_context": "YouTube 首页推荐流,当前浏览器可能已登录用户账号。",
  39. "randomize": true,
  40. "save_screenshot": true,
  41. "fail_if_not_found": true,
  42. "temperature": 0.2
  43. },
  44. "inputs": {}
  45. },
  46. {
  47. "id": "click",
  48. "type": "mouse.click",
  49. "title": "点击播放",
  50. "position": {"x": 1040, "y": 180},
  51. "params": {"button": "left", "clicks": 1, "duration": 0},
  52. "inputs": {
  53. "x": {"source": "node_output", "node_id": "locate", "output": "x"},
  54. "y": {"source": "node_output", "node_id": "locate", "output": "y"}
  55. }
  56. },
  57. {"id": "end", "type": "flow.end", "title": "结束", "position": {"x": 1280, "y": 180}, "params": {}, "inputs": {}}
  58. ],
  59. "edges": [
  60. {"id": "start_to_open", "kind": "control", "source": "start", "source_port": "next", "target": "open", "target_port": "run"},
  61. {"id": "open_to_wait", "kind": "control", "source": "open", "source_port": "success", "target": "wait", "target_port": "run"},
  62. {"id": "wait_to_locate", "kind": "control", "source": "wait", "source_port": "success", "target": "locate", "target_port": "run"},
  63. {"id": "locate_to_click", "kind": "control", "source": "locate", "source_port": "success", "target": "click", "target_port": "run"},
  64. {"id": "click_to_end", "kind": "control", "source": "click", "source_port": "success", "target": "end", "target_port": "run"}
  65. ]
  66. }