douyin-random-video.workflow.json 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {
  2. "schema_version": "workflow/v1",
  3. "workflow_key": "douyin-random-video",
  4. "name": "视觉点击:打开随机抖音视频",
  5. "description": "打开真实浏览器中的抖音推荐页,用多模态 AI 定位当前推荐视频区域并点击播放/聚焦。",
  6. "variables": {
  7. "douyin_url": {
  8. "type": "string",
  9. "default": "https://www.douyin.com/",
  10. "description": "抖音推荐入口地址,通常保持默认即可"
  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. {"id": "open", "type": "browser.open_url", "title": "打开抖音推荐页", "position": {"x": 300, "y": 180}, "params": {"browser": "edge", "new_window": true}, "inputs": {"url": {"source": "variable", "name": "douyin_url"}}},
  22. {"id": "wait", "type": "wait.seconds", "title": "等待页面加载", "position": {"x": 540, "y": 180}, "params": {"seconds": 8}, "inputs": {}},
  23. {
  24. "id": "locate",
  25. "type": "vision.locate_element",
  26. "title": "AI 定位当前视频",
  27. "position": {"x": 780, "y": 180},
  28. "params": {
  29. "target_description": "定位当前抖音推荐页中正在展示的主视频画面中心,优先点击视频画面可播放区域。不要选择搜索框、头像、关注按钮、评论按钮、点赞按钮、分享按钮或浏览器控件。",
  30. "screen_context": "抖音网页推荐视频流。",
  31. "randomize": false,
  32. "save_screenshot": true,
  33. "fail_if_not_found": true,
  34. "temperature": 0.1
  35. },
  36. "inputs": {}
  37. },
  38. {
  39. "id": "click",
  40. "type": "mouse.click",
  41. "title": "点击播放/聚焦",
  42. "position": {"x": 1040, "y": 180},
  43. "params": {"button": "left", "clicks": 1, "duration": 0},
  44. "inputs": {
  45. "x": {"source": "node_output", "node_id": "locate", "output": "x"},
  46. "y": {"source": "node_output", "node_id": "locate", "output": "y"}
  47. }
  48. },
  49. {"id": "end", "type": "flow.end", "title": "结束", "position": {"x": 1280, "y": 180}, "params": {}, "inputs": {}}
  50. ],
  51. "edges": [
  52. {"id": "start_to_open", "kind": "control", "source": "start", "source_port": "next", "target": "open", "target_port": "run"},
  53. {"id": "open_to_wait", "kind": "control", "source": "open", "source_port": "success", "target": "wait", "target_port": "run"},
  54. {"id": "wait_to_locate", "kind": "control", "source": "wait", "source_port": "success", "target": "locate", "target_port": "run"},
  55. {"id": "locate_to_click", "kind": "control", "source": "locate", "source_port": "success", "target": "click", "target_port": "run"},
  56. {"id": "click_to_end", "kind": "control", "source": "click", "source_port": "success", "target": "end", "target_port": "run"}
  57. ]
  58. }