process.json 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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. "video_like_btn_center_pos": ""
  15. },
  16. "execute": [
  17. {
  18. "type": "while",
  19. "condition": "1",
  20. "body": [
  21. {
  22. "type": "random",
  23. "inVars": [
  24. "1",
  25. "3"
  26. ],
  27. "outVars": [
  28. "{swipe-count}"
  29. ]
  30. },
  31. {
  32. "type": "schedule",
  33. "condition": {
  34. "interval": "7s",
  35. "repeat": "{swipe-count}"
  36. },
  37. "interval": [
  38. {
  39. "type": "fun",
  40. "method": "adb-swipe",
  41. "inVars": [
  42. "up-down"
  43. ],
  44. "outVars": []
  45. }
  46. ]
  47. },
  48. {
  49. "type": "random",
  50. "inVars": [
  51. "200",
  52. "780"
  53. ],
  54. "outVars": [
  55. "{click-x}"
  56. ]
  57. },
  58. {
  59. "type": "random",
  60. "inVars": [
  61. "400",
  62. "1500"
  63. ],
  64. "outVars": [
  65. "{click-y}"
  66. ]
  67. },
  68. {
  69. "type": "set",
  70. "variable": "{random-click-pos}",
  71. "value": "{click-x},{click-y}"
  72. },
  73. {
  74. "type": "fun",
  75. "method": "adb-click",
  76. "inVars": [
  77. "{random-click-pos}"
  78. ],
  79. "outVars": []
  80. },
  81. {
  82. "type": "random",
  83. "inVars": [
  84. 10,
  85. 2000
  86. ],
  87. "outVars": [
  88. "{stay-duration}"
  89. ]
  90. },
  91. {
  92. "type": "try",
  93. "continueAfterFail": true,
  94. "try": [
  95. {
  96. "type": "if",
  97. "condition": "{video_like_btn_center_pos} != \"\"",
  98. "then": [
  99. {
  100. "type": "fun",
  101. "method": "img-center-point-location",
  102. "inVars": [
  103. "视频点赞.png"
  104. ],
  105. "outVars": [
  106. "{send-btn-pos}"
  107. ]
  108. },
  109. {
  110. "type": "fun",
  111. "method": "persist-save",
  112. "inVars": [
  113. "rednote_browse_video_like_btn",
  114. "{send-btn-pos}"
  115. ],
  116. "outVars": []
  117. }
  118. ],
  119. "else": [
  120. {
  121. "type": "fun",
  122. "method": "persist-read",
  123. "inVars": [
  124. "rednote_browse_video_like_btn"
  125. ],
  126. "outVars": [
  127. "{send-btn-pos}"
  128. ]
  129. }
  130. ]
  131. }
  132. ],
  133. "success": [
  134. {
  135. "type": "random",
  136. "inVars": [
  137. "2",
  138. "10"
  139. ],
  140. "outVars": [
  141. "{swipe-count}"
  142. ]
  143. },
  144. {
  145. "type": "for",
  146. "times": "{swipe-count}",
  147. "variable": "{i}",
  148. "body": [
  149. {
  150. "type": "random",
  151. "inVars": [
  152. 5,
  153. 30
  154. ],
  155. "outVars": [
  156. "{stay-duration}"
  157. ]
  158. },
  159. {
  160. "type": "delay",
  161. "value": "{{stay-duration}}s"
  162. },
  163. {
  164. "type": "fun",
  165. "method": "adb-swipe",
  166. "inVars": [
  167. "down-up"
  168. ],
  169. "outVars": []
  170. },
  171. {
  172. "type": "if",
  173. "condition": "{stay-duration} > 25",
  174. "then": [
  175. {
  176. "type": "random",
  177. "inVars": [
  178. 0,
  179. 1
  180. ],
  181. "outVars": [
  182. "{b-like-click}"
  183. ]
  184. },
  185. {
  186. "type": "if",
  187. "condition": "{b-like-click} == 1",
  188. "then": [
  189. {
  190. "type": "fun",
  191. "method": "adb-click",
  192. "inVars": [
  193. "{send-btn-pos}"
  194. ],
  195. "outVars": []
  196. }
  197. ],
  198. "else": []
  199. }
  200. ],
  201. "else": []
  202. }
  203. ]
  204. }
  205. ],
  206. "fail": [
  207. {
  208. "type": "echo",
  209. "inVars": [
  210. "点赞图标匹配失败"
  211. ]
  212. }
  213. ]
  214. },
  215. {
  216. "type": "fun",
  217. "method": "adb-keyevent",
  218. "inVars": [
  219. "4"
  220. ],
  221. "outVars": []
  222. }
  223. ]
  224. }
  225. ]
  226. }