MCPcopy Create free account
hub / github.com/wistbean/learn_python3_spider / get_path

Function get_path

fuck_bilibili_captcha.py:84–100  ·  view source on GitHub ↗
(distance)

Source from the content-addressed store, hash-verified

82
83
84def get_path(distance):
85 result = []
86 current = 0
87 mid = distance * 4 / 5
88 t = 0.2
89 v = 0
90 while current < (distance - 10):
91 if current < mid:
92 a = 2
93 else:
94 a = -3
95 v0 = v
96 v = v0 + a * t
97 s = v0 * t + 0.5 * a * t * t
98 current += s
99 result.append(round(s))
100 return result
101
102
103def start_drag(driver, distance):

Callers 1

start_dragFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected