2captcha-python 2.0.1__tar.gz → 2.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: 2captcha-python
3
- Version: 2.0.1
3
+ Version: 2.0.3
4
4
  Summary: Python module for easy integration with 2Captcha API
5
5
  Home-page: https://github.com/2captcha/2captcha-python/
6
6
  Author: 2Captcha
@@ -79,6 +79,7 @@ Examples of API requests for different captcha types are available on the [Pytho
79
79
  - [VKCaptcha](#vkcaptcha)
80
80
  - [CaptchaFox](#captchafox)
81
81
  - [Prosopo](#prosopo)
82
+ - [Temu](#temu)
82
83
  - [CyberSiARA](#cybersiara)
83
84
  - [Other methods](#other-methods)
84
85
  - [send / get\_result](#send--get_result)
@@ -531,6 +532,19 @@ result = solver.prosopo(sitekey='5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNb1DkVLS0Jbq
531
532
  )
532
533
  ```
533
534
 
535
+ ### Temu
536
+
537
+ <sup>[API method description.](https://2captcha.com/ru/2captcha-api#temucaptcha)</sup>
538
+
539
+ This method can be used to solve Temu captcha. Returns a coordinates.
540
+
541
+ ```python
542
+ result = solver.temu(body="data:image/png;base64,iVBORw0KG...",
543
+ part1="data:image/png;base64,iVBORw0KG...",
544
+ part2="data:image/png;base64,iVBORw0KG...",
545
+ part3="data:image/png;base64,iVBORw0KG...")
546
+ ```
547
+
534
548
  ### CyberSiARA
535
549
 
536
550
  <sup>[API method description.](https://2captcha.com/2captcha-api#cybersiara)</sup>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: 2captcha-python
3
- Version: 2.0.1
3
+ Version: 2.0.3
4
4
  Summary: Python module for easy integration with 2Captcha API
5
5
  Home-page: https://github.com/2captcha/2captcha-python/
6
6
  Author: 2Captcha
@@ -79,6 +79,7 @@ Examples of API requests for different captcha types are available on the [Pytho
79
79
  - [VKCaptcha](#vkcaptcha)
80
80
  - [CaptchaFox](#captchafox)
81
81
  - [Prosopo](#prosopo)
82
+ - [Temu](#temu)
82
83
  - [CyberSiARA](#cybersiara)
83
84
  - [Other methods](#other-methods)
84
85
  - [send / get\_result](#send--get_result)
@@ -531,6 +532,19 @@ result = solver.prosopo(sitekey='5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNb1DkVLS0Jbq
531
532
  )
532
533
  ```
533
534
 
535
+ ### Temu
536
+
537
+ <sup>[API method description.](https://2captcha.com/ru/2captcha-api#temucaptcha)</sup>
538
+
539
+ This method can be used to solve Temu captcha. Returns a coordinates.
540
+
541
+ ```python
542
+ result = solver.temu(body="data:image/png;base64,iVBORw0KG...",
543
+ part1="data:image/png;base64,iVBORw0KG...",
544
+ part2="data:image/png;base64,iVBORw0KG...",
545
+ part3="data:image/png;base64,iVBORw0KG...")
546
+ ```
547
+
534
548
  ### CyberSiARA
535
549
 
536
550
  <sup>[API method description.](https://2captcha.com/2captcha-api#cybersiara)</sup>
@@ -46,6 +46,7 @@ Examples of API requests for different captcha types are available on the [Pytho
46
46
  - [VKCaptcha](#vkcaptcha)
47
47
  - [CaptchaFox](#captchafox)
48
48
  - [Prosopo](#prosopo)
49
+ - [Temu](#temu)
49
50
  - [CyberSiARA](#cybersiara)
50
51
  - [Other methods](#other-methods)
51
52
  - [send / get\_result](#send--get_result)
@@ -498,6 +499,19 @@ result = solver.prosopo(sitekey='5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNb1DkVLS0Jbq
498
499
  )
499
500
  ```
500
501
 
502
+ ### Temu
503
+
504
+ <sup>[API method description.](https://2captcha.com/ru/2captcha-api#temucaptcha)</sup>
505
+
506
+ This method can be used to solve Temu captcha. Returns a coordinates.
507
+
508
+ ```python
509
+ result = solver.temu(body="data:image/png;base64,iVBORw0KG...",
510
+ part1="data:image/png;base64,iVBORw0KG...",
511
+ part2="data:image/png;base64,iVBORw0KG...",
512
+ part3="data:image/png;base64,iVBORw0KG...")
513
+ ```
514
+
501
515
  ### CyberSiARA
502
516
 
503
517
  <sup>[API method description.](https://2captcha.com/2captcha-api#cybersiara)</sup>
@@ -17,4 +17,4 @@ support@2captcha.com
17
17
  """
18
18
 
19
19
  __author__ = '2captcha'
20
- __version__ = '2.0.1'
20
+ __version__ = '2.0.3'
@@ -122,7 +122,7 @@ class AsyncTwoCaptcha():
122
122
  if not lang or lang not in ("en", "ru", "de", "el", "pt", "fr"):
123
123
  raise ValidationException(f'Lang not in "en", "ru", "de", "el", "pt", "fr". You send {lang}')
124
124
 
125
- result = await self.solve(body=body, method=method, **kwargs)
125
+ result = await self.solve(body=body, method=method, lang=lang, **kwargs)
126
126
  return result
127
127
 
128
128
  async def text(self, text, **kwargs):
@@ -555,6 +555,8 @@ class AsyncTwoCaptcha():
555
555
  Value of captcha_id parameter you found on target website.
556
556
  url: str
557
557
  Full URL of the page where you see Geetest captcha.
558
+ risk_type: str, optional
559
+ Value of risk_type parameter is contained in the captcha loading request.
558
560
  softId : int, optional
559
561
  ID of software developer. Developers who integrated their software with 2Captcha get reward: 10% of
560
562
  spendings of their software users.
@@ -897,6 +899,29 @@ class AsyncTwoCaptcha():
897
899
  **kwargs)
898
900
  return result
899
901
 
902
+ async def temu(self, body, part1, part2, part3, **kwargs):
903
+ '''Wrapper for solving Temu captcha .
904
+
905
+ Parameters
906
+ __________
907
+ body : str
908
+ Main captcha image as a base64 string.
909
+ part1 : str
910
+ Tile element as a base64 string.
911
+ part2 : str
912
+ Tile element as a base64 string.
913
+ part3 : str
914
+ Tile element as a base64 string.
915
+ '''
916
+
917
+ result = await self.solve(method='temuimage',
918
+ body=body,
919
+ part1=part1,
920
+ part2=part2,
921
+ part3=part3,
922
+ **kwargs)
923
+ return result
924
+
900
925
  async def datadome(self, captcha_url, pageurl, userAgent, proxy, **kwargs):
901
926
  """Wrapper for solving DataDome Captcha.
902
927
 
@@ -1120,8 +1145,8 @@ class AsyncTwoCaptcha():
1120
1145
 
1121
1146
  '''
1122
1147
  rep = 'reportgood' if correct else 'reportbad'
1123
- await self.api_client.res(key=self.API_KEY, action=rep, id=id_)
1124
- return
1148
+ answer = await self.api_client.res(key=self.API_KEY, action=rep, id=id_)
1149
+ return answer
1125
1150
 
1126
1151
  def rename_params(self, params):
1127
1152
  replace = {
@@ -243,7 +243,7 @@ class TwoCaptcha():
243
243
  if not lang or lang not in ("en", "ru", "de", "el", "pt", "fr"):
244
244
  raise ValidationException(f'Lang not in "en", "ru", "de", "el", "pt", "fr". You send {lang}')
245
245
 
246
- result = self.solve(body=body, method=method, **kwargs)
246
+ result = self.solve(body=body, method=method, lang=lang, **kwargs)
247
247
  return result
248
248
 
249
249
  def text(self, text, **kwargs):
@@ -685,6 +685,8 @@ class TwoCaptcha():
685
685
  Value of captcha_id parameter you found on target website.
686
686
  url: str
687
687
  Full URL of the page where you see Geetest captcha.
688
+ risk_type: str, optional
689
+ Value of risk_type parameter is contained in the captcha loading request.
688
690
  softId : int, optional
689
691
  ID of software developer. Developers who integrated their software with 2Captcha get reward: 10% of
690
692
  spendings of their software users.
@@ -1027,6 +1029,29 @@ class TwoCaptcha():
1027
1029
  **kwargs)
1028
1030
  return result
1029
1031
 
1032
+ def temu(self, body, part1, part2, part3, **kwargs):
1033
+ '''Wrapper for solving Temu captcha .
1034
+
1035
+ Parameters
1036
+ __________
1037
+ body : str
1038
+ Main captcha image as a base64 string.
1039
+ part1 : str
1040
+ Tile element as a base64 string.
1041
+ part2 : str
1042
+ Tile element as a base64 string.
1043
+ part3 : str
1044
+ Tile element as a base64 string.
1045
+ '''
1046
+
1047
+ result = self.solve(method='temuimage',
1048
+ body=body,
1049
+ part1=part1,
1050
+ part2=part2,
1051
+ part3=part3,
1052
+ **kwargs)
1053
+ return result
1054
+
1030
1055
  def datadome(self, captcha_url, pageurl, userAgent, proxy, **kwargs):
1031
1056
  """Wrapper for solving DataDome Captcha.
1032
1057
 
@@ -1263,9 +1288,9 @@ class TwoCaptcha():
1263
1288
  '''
1264
1289
 
1265
1290
  rep = 'reportgood' if correct else 'reportbad'
1266
- self.api_client.res(key=self.API_KEY, action=rep, id=id_)
1291
+ answer = self.api_client.res(key=self.API_KEY, action=rep, id=id_)
1267
1292
 
1268
- return
1293
+ return answer
1269
1294
 
1270
1295
  def rename_params(self, params):
1271
1296
 
File without changes