bilibili-home-random-video.workflow.json 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {
  2. "schema_version": "workflow/v1",
  3. "workflow_key": "bilibili-home-random-video",
  4. "name": "视觉点击:随机 Bilibili 首页推荐视频",
  5. "description": "打开真实浏览器中的 Bilibili 首页,用多模态 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. {"id": "open", "type": "browser.open_url", "title": "打开 B 站首页", "position": {"x": 300, "y": 180}, "params": {"url": "https://www.bilibili.com/", "browser": "edge", "new_window": true}, "inputs": {}},
  16. {"id": "wait", "type": "wait.seconds", "title": "等待页面加载", "position": {"x": 540, "y": 180}, "params": {"seconds": 6}, "inputs": {}},
  17. {
  18. "id": "locate",
  19. "type": "vision.locate_element",
  20. "title": "AI 定位随机首页视频",
  21. "position": {"x": 780, "y": 180},
  22. "params": {
  23. "target_description": "从当前 Bilibili 首页可见的推荐视频卡片中随机选择一个可点击的视频封面或标题中心。不要选择顶部导航、搜索框、直播入口、广告横幅、番剧导航、用户头像或轮播空白区域。",
  24. "screen_context": "Bilibili 首页推荐流,当前浏览器可能已登录用户账号。",
  25. "randomize": true,
  26. "save_screenshot": true,
  27. "fail_if_not_found": true,
  28. "temperature": 0.2
  29. },
  30. "inputs": {}
  31. },
  32. {
  33. "id": "click",
  34. "type": "mouse.click",
  35. "title": "点击播放",
  36. "position": {"x": 1040, "y": 180},
  37. "params": {"button": "left", "clicks": 1, "duration": 0},
  38. "inputs": {
  39. "x": {"source": "node_output", "node_id": "locate", "output": "x"},
  40. "y": {"source": "node_output", "node_id": "locate", "output": "y"}
  41. }
  42. },
  43. {"id": "end", "type": "flow.end", "title": "结束", "position": {"x": 1280, "y": 180}, "params": {}, "inputs": {}}
  44. ],
  45. "edges": [
  46. {"id": "start_to_open", "kind": "control", "source": "start", "source_port": "next", "target": "open", "target_port": "run"},
  47. {"id": "open_to_wait", "kind": "control", "source": "open", "source_port": "success", "target": "wait", "target_port": "run"},
  48. {"id": "wait_to_locate", "kind": "control", "source": "wait", "source_port": "success", "target": "locate", "target_port": "run"},
  49. {"id": "locate_to_click", "kind": "control", "source": "locate", "source_port": "success", "target": "click", "target_port": "run"},
  50. {"id": "click_to_end", "kind": "control", "source": "click", "source_port": "success", "target": "end", "target_port": "run"}
  51. ]
  52. }