process.json 2.7 KB

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