File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,10 +45,17 @@ def get_token(form_html):
4545 return job .get_token_response ()
4646
4747
48+ def form_submit (token ):
49+ return requests .post (
50+ url = "{}/verify" .format (url ), data = {"name" : "xx" , "fc-token" : token }
51+ ).text
52+
53+
4854def process ():
4955 html = get_form_html ()
50- return get_token (html )
56+ token = get_token (html )
57+ return form_submit (token )
5158
5259
5360if __name__ == "__main__" :
54- print (' Solved!' in process ())
61+ print (" Solved!" in process ())
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ class FuncaptchaTestCase(TestCase):
6565 def test_funcaptcha (self ):
6666 from examples import funcaptcha_request
6767
68- self .assertIn (' Solved!' , funcaptcha_request .process ())
68+ self .assertIn (" Solved!" , funcaptcha_request .process ())
6969
7070
7171@missing_key
@@ -121,7 +121,7 @@ def test_process(self):
121121
122122
123123@missing_key
124- @skipIf (True , ' We testing via proxy for performance reason.' )
124+ @skipIf (True , " We testing via proxy for performance reason." )
125125class HCaptchaTaskProxylessTestCase (TestCase ):
126126 @retry (tries = 3 )
127127 def test_process (self ):
@@ -132,6 +132,7 @@ def test_process(self):
132132
133133@missing_key
134134class HCaptchaTaskTestCase (TestCase ):
135+ @retry (tries = 3 )
135136 def test_process (self ):
136137 from examples import hcaptcha_request_proxy
137138
You can’t perform that action at this time.
0 commit comments