bilibili-up-latest-video.workflow.json 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {
  2. "schema_version": "workflow/v1",
  3. "workflow_key": "bilibili-up-latest-video",
  4. "name": "视觉点击:指定 Bilibili UP 主最新视频",
  5. "description": "打开指定 Bilibili UP 主的视频页,用多模态 AI 定位最新投稿并点击播放。",
  6. "variables": {
  7. "up_url": {
  8. "type": "string",
  9. "default": "https://space.bilibili.com/2/video",
  10. "description": "Bilibili UP 主视频页地址,建议使用 /video 结尾"
  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": "打开 UP 主视频页", "position": {"x": 300, "y": 180}, "params": {"browser": "edge", "new_window": true}, "inputs": {"url": {"source": "variable", "name": "up_url"}}},
  22. {"id": "wait", "type": "wait.seconds", "title": "等待页面加载", "position": {"x": 540, "y": 180}, "params": {"seconds": 6}, "inputs": {}},
  23. {
  24. "id": "locate",
  25. "type": "vision.locate_element",
  26. "title": "AI 定位最新投稿",
  27. "position": {"x": 780, "y": 180},
  28. "params": {
  29. "target_description": "定位 Bilibili UP 主视频列表中最新发布的公开视频,通常是投稿列表或视频网格中最靠前的第一个视频封面或标题中心。不要选择动态、合集、播放列表、头像、关注按钮、搜索框或导航标签。",
  30. "screen_context": "Bilibili UP 主空间 /video 页面。",
  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. }