process.json 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. {
  2. "name": "RedNoteBrowsingAndThumbsUp",
  3. "description": "小红书随机浏览和点赞",
  4. "variables": {
  5. "page-index": 0,
  6. "up-or-down": 0,
  7. "swipe-count": 0,
  8. "click-x": 0,
  9. "click-y": 0,
  10. "random-click-pos": "",
  11. "stay-duration": 0,
  12. "send-btn-pos": "",
  13. "b-like-click": 0
  14. },
  15. "execute": [
  16. {
  17. "type": "while",
  18. "condition": "1",
  19. "body": [
  20. {
  21. "type": "random",
  22. "inVars": ["1", "3"],
  23. "outVars": ["{swipe-count}"]
  24. },
  25. {
  26. "type": "schedule",
  27. "condition": {
  28. "interval": "7s",
  29. "repeat": "{swipe-count}"
  30. },
  31. "interval": [
  32. {
  33. "type": "fun",
  34. "method": "adb-swipe",
  35. "inVars": ["up-down"],
  36. "outVars": []
  37. }
  38. ]
  39. },
  40. {
  41. "type": "random",
  42. "inVars": ["200", "780"],
  43. "outVars": ["{click-x}"]
  44. },
  45. {
  46. "type": "random",
  47. "inVars": ["400", "1500"],
  48. "outVars": ["{click-y}"]
  49. },
  50. {
  51. "type": "set",
  52. "variable": "{random-click-pos}",
  53. "value": "{click-x},{click-y}"
  54. },
  55. {
  56. "type": "fun",
  57. "method": "adb-click",
  58. "inVars": ["{random-click-pos}"]
  59. },
  60. {
  61. "type": "random",
  62. "inVars": [10, 2000],
  63. "outVars": ["{stay-duration}"]
  64. },
  65. {
  66. "type": "try",
  67. "continueAfterFail": true,
  68. "try": [
  69. {
  70. "type": "fun",
  71. "method": "img-center-point-location",
  72. "inVars": ["视频点赞.png"],
  73. "outVars": ["{send-btn-pos}"]
  74. }
  75. ],
  76. "success": [
  77. {
  78. "type": "random",
  79. "inVars": ["2", "10"],
  80. "outVars": ["{swipe-count}"]
  81. },
  82. {
  83. "type": "for",
  84. "times": "{swipe-count}",
  85. "variable": "{i}",
  86. "body": [
  87. {
  88. "type": "random",
  89. "inVars": [5, 30],
  90. "outVars": ["{stay-duration}"]
  91. },
  92. {
  93. "type": "delay",
  94. "value": "{{stay-duration}}s"
  95. },
  96. {
  97. "type": "fun",
  98. "method": "adb-swipe",
  99. "inVars": ["down-up"],
  100. "outVars": []
  101. },
  102. {
  103. "type": "if",
  104. "condition": "{stay-duration} > 25",
  105. "ture": [
  106. {
  107. "type": "random",
  108. "inVars": [0, 1],
  109. "outVars": ["{b-like-click}"]
  110. },
  111. {
  112. "type": "if",
  113. "condition": "{b-like-click} == 1",
  114. "ture": [
  115. {
  116. "type": "fun",
  117. "method": "adb-click",
  118. "inVars": ["{send-btn-pos}"]
  119. }
  120. ]
  121. }
  122. ]
  123. }
  124. ]
  125. }
  126. ],
  127. "fail": [
  128. {
  129. "type": "echo",
  130. "value": "点赞图标匹配失败"
  131. }
  132. ]
  133. },
  134. {
  135. "type": "fun",
  136. "method": "adb-keyevent",
  137. "inVars": ["4"],
  138. "outVars": []
  139. }
  140. ]
  141. }
  142. ]
  143. }