MCPcopy Create free account
hub / github.com/KingFuRong/pythonSpider / pass_captcha

Function pass_captcha

AutoSign/laowang.py:45–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43
44
45def pass_captcha():
46 captcha_url = "https://laowang.vip/captcha/tncode.php"
47 captcha_params = {
48 "t": "0.0923756200765189"
49 }
50 captcha_response = session.get(captcha_url, params=captcha_params)
51
52 split_captcha(captcha_response)
53 cut_slide("./slide.png")
54 sliding_distance = find_location('./slide.png', './bg.png')
55
56 check_url = "https://laowang.vip/captcha/check.php"
57 check_params = {
58 "tn_r": sliding_distance
59 }
60 check_response = session.get(check_url, params=check_params)
61 if check_response.text.find('ok') != -1:
62 return check_response.text
63 else:
64 return pass_captcha()
65
66
67def login():

Callers 2

loginFunction · 0.85
laowang.pyFile · 0.85

Calls 3

split_captchaFunction · 0.85
cut_slideFunction · 0.85
find_locationFunction · 0.85

Tested by

no test coverage detected