2captcha-python 2.0.0__py3-none-any.whl → 2.0.1__py3-none-any.whl

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,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: 2captcha-python
3
- Version: 2.0.0
3
+ Version: 2.0.1
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
7
7
  Author-email: info@2captcha.com
8
- Keywords: 2captcha,captcha,api,captcha solver,reCAPTCHA,FunCaptcha,Geetest,image captcha,Coordinates,Click Captcha,Geetest V4,Lemin captcha,Amazon WAF,Cloudflare Turnstile,Capy Puzzle,MTCaptcha,Friendly Captcha,Tencent,Cutcaptcha,DataDome,cybersiara
8
+ Keywords: 2captcha,captcha,api,captcha solver,reCAPTCHA,FunCaptcha,Geetest,image captcha,Coordinates,Click Captcha,Geetest V4,Lemin captcha,Amazon WAF,Cloudflare Turnstile,Capy Puzzle,MTCaptcha,Friendly Captcha,Tencent,Cutcaptcha,DataDome,VK Captcha,CaptchaFox,Prosopo,cybersiara
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
@@ -13,7 +13,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
13
13
  Classifier: Topic :: Scientific/Engineering :: Image Recognition
14
14
  Classifier: Topic :: Utilities
15
15
  Classifier: Intended Audience :: Developers
16
- Requires-Python: >=3.6
16
+ Requires-Python: >=3.8
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  Requires-Dist: requests
@@ -75,6 +75,10 @@ Examples of API requests for different captcha types are available on the [Pytho
75
75
  - [Cutcaptcha](#cutcaptcha)
76
76
  - [Tencent](#tencent)
77
77
  - [DataDome](#datadome)
78
+ - [VKImage](#vkimage)
79
+ - [VKCaptcha](#vkcaptcha)
80
+ - [CaptchaFox](#captchafox)
81
+ - [Prosopo](#prosopo)
78
82
  - [CyberSiARA](#cybersiara)
79
83
  - [Other methods](#other-methods)
80
84
  - [send / get\_result](#send--get_result)
@@ -473,6 +477,60 @@ result = solver.datadome(captcha_url="https://geo.captcha-delivery.com/captcha/?
473
477
  param1=..., ...)
474
478
  ```
475
479
 
480
+ ### VKImage
481
+
482
+ <sup>[API method description.](https://2captcha.com/2captcha-api#vkcaptcha)</sup>
483
+
484
+ This method can be used to solve VK captcha using graphical captcha. Returns the number of steps and solution value in the target site's API format.
485
+
486
+ ```python
487
+ result = solver.vkimage('path/to/captcha.jpg', steps='[5,4,7,7,14,22,8,...]', ...)
488
+ ```
489
+
490
+ ### VKCaptcha
491
+
492
+ <sup>[API method description.](https://2captcha.com/2captcha-api#vkcaptcha)</sup>
493
+
494
+ This method can be used to solve VK Captcha using a token. Returns a token.
495
+
496
+ > [!IMPORTANT]
497
+ > To solve the VK Captcha, you must use a proxy. It is recommended to use [residential proxies].
498
+
499
+ ```python
500
+ result = solver.vkcaptcha(redirect_uri='https://id.vk.ru/...',
501
+ userAgent='Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36..',
502
+ proxy={
503
+ 'type': 'HTTP',
504
+ 'uri': 'login:password@IP_address:PORT'}
505
+ )
506
+ ```
507
+
508
+ ### CaptchaFox
509
+
510
+ <sup>[API method description.](https://2captcha.com/2captcha-api#captchafox)</sup>
511
+
512
+ This method can be used to solve CaptchaFox using a token. Returns a token.
513
+
514
+ ```python
515
+ result = solver.captchafox(sitekey='sk_ILKWNruBBVKDOM7dZs59KHnDLEWiH',
516
+ pageurl='https://mysite.com/page/with/captchafox',
517
+ userAgent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
518
+ proxy={'type': 'HTTPS',
519
+ 'uri': 'login:password@IP_address:PORT'})
520
+ ```
521
+
522
+ ### Prosopo
523
+
524
+ <sup>[API method description.](https://2captcha.com/2captcha-api#prosopo-procaptcha)</sup>
525
+
526
+ This method can be used to solve Prosopo captcha using a token. Returns a token.
527
+
528
+ ```python
529
+ result = solver.prosopo(sitekey='5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNb1DkVLS0JbqR',
530
+ pageurl='https://mysite.com/page/with/prosopo'
531
+ )
532
+ ```
533
+
476
534
  ### CyberSiARA
477
535
 
478
536
  <sup>[API method description.](https://2captcha.com/2captcha-api#cybersiara)</sup>
@@ -0,0 +1,13 @@
1
+ 2captcha_python-2.0.1.dist-info/licenses/LICENSE,sha256=sbILKjQcxUC6dAvBbivnRX9YCshBI9XRvvk1LGkpMEo,1065
2
+ twocaptcha/__init__.py,sha256=Vs7bsefnJtoVLkRkrTp_NkUW1Dl8wQ4VzB5J7Cp1sMk,542
3
+ twocaptcha/api.py,sha256=vlYOhc3rGIHOVGq4hZjJ54tUxBpBzI2FgWPctllb7D0,2826
4
+ twocaptcha/async_api.py,sha256=L467rsgdVVrgWaLkvengoTE8GvCgQAfM2PmVO2kfad4,3534
5
+ twocaptcha/async_solver.py,sha256=khdxsgvlOHxkyEtX8ogc7IcHyRRVxm_T2HhbwdVp7ks,49270
6
+ twocaptcha/solver.py,sha256=3j1xWFwi2MOvQI9UoF-M-XX97Mjs68UDTnZZC0Ol9fU,55732
7
+ twocaptcha/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ twocaptcha/exceptions/api.py,sha256=N810fZxcNE2AwCM9EyFrXpDpzAKsKi_tHCnRJn4CH7s,86
9
+ twocaptcha/exceptions/solver.py,sha256=hvKUebPMvC51ve6MSmv_3q1J9vkhS90XO2ivoVToyoU,255
10
+ 2captcha_python-2.0.1.dist-info/METADATA,sha256=38qYapqMFD2t9AwyxnEQsj2TJifnopV9AduYmnpEkFA,30517
11
+ 2captcha_python-2.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
+ 2captcha_python-2.0.1.dist-info/top_level.txt,sha256=AvFZdM89oM6Vo97ZTxT9AxHWpwoO3_Qf5ORMV3NClFE,11
13
+ 2captcha_python-2.0.1.dist-info/RECORD,,
twocaptcha/__init__.py CHANGED
@@ -17,4 +17,4 @@ support@2captcha.com
17
17
  """
18
18
 
19
19
  __author__ = '2captcha'
20
- __version__ = '2.0.0'
20
+ __version__ = '2.0.1'
@@ -800,6 +800,103 @@ class AsyncTwoCaptcha():
800
800
  **kwargs)
801
801
  return result
802
802
 
803
+ async def vkimage(self, files, steps, **kwargs):
804
+ '''Wrapper for solving vkimage captcha.
805
+
806
+ Parameters
807
+ __________
808
+ file : str
809
+ Captcha image as a file or base64.
810
+ steps: str
811
+ Array of steps.
812
+ proxy : dict, optional
813
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
814
+ '''
815
+
816
+ if isinstance(files, str):
817
+
818
+ payload = await self.get_method(files)
819
+ payload.pop('method', None)
820
+
821
+ result = await self.solve(method='vkimage', steps=steps, **payload, **kwargs)
822
+ return result
823
+
824
+ elif isinstance(files, dict):
825
+ files = list(files.values())
826
+
827
+ files = self.extract_files(files)
828
+
829
+ result = await self.solve(method='vkimage',
830
+ files=files,
831
+ steps=steps,
832
+ **kwargs)
833
+ return result
834
+
835
+ async def vkcaptcha(self, redirect_uri, userAgent, proxy, **kwargs):
836
+ '''Wrapper for solving VK captcha using tokens.
837
+
838
+ Parameters
839
+ __________
840
+ redirect_uri : str
841
+ The URL that is returned for requests to the captchas API.
842
+ userAgent : str
843
+ User-Agent of the browser that will be used by the employee when loading the captcha.
844
+ proxy : dict
845
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
846
+ '''
847
+
848
+
849
+ result = await self.solve(method='vkcaptcha',
850
+ redirect_uri=redirect_uri,
851
+ useragent=userAgent,
852
+ proxy=proxy,
853
+ **kwargs)
854
+ return result
855
+
856
+ async def captchafox(self, sitekey, pageurl, userAgent, proxy, **kwargs):
857
+ '''Wrapper for solving CaptchaFox using tokens.
858
+
859
+ Parameters
860
+ __________
861
+ sitekey : str
862
+ The sitekey parameter value found on the page or in network requests.
863
+ pageurl : str
864
+ Full URL of the page with captcha.
865
+ userAgent : str
866
+ User-Agent of the browser that will be used by the employee when loading the captcha.
867
+ proxy : dict
868
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
869
+ '''
870
+
871
+
872
+ result = await self.solve(method='captchafox',
873
+ sitekey=sitekey,
874
+ pageurl=pageurl,
875
+ useragent=userAgent,
876
+ proxy=proxy,
877
+ **kwargs)
878
+ return result
879
+
880
+ async def prosopo(self, sitekey, pageurl, **kwargs):
881
+ '''Wrapper for solving Prosopo captcha using tokens.
882
+
883
+ Parameters
884
+ __________
885
+ sitekey : str
886
+ The sitekey parameter value found on the page or in network requests.
887
+ pageurl : str
888
+ Full URL of the page with captcha.
889
+ proxy : dict, optional
890
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
891
+ '''
892
+
893
+
894
+ result = await self.solve(method='prosopo',
895
+ sitekey=sitekey,
896
+ pageurl=pageurl,
897
+ **kwargs)
898
+ return result
899
+
803
900
  async def datadome(self, captcha_url, pageurl, userAgent, proxy, **kwargs):
804
901
  """Wrapper for solving DataDome Captcha.
805
902
 
twocaptcha/solver.py CHANGED
@@ -930,6 +930,103 @@ class TwoCaptcha():
930
930
  **kwargs)
931
931
  return result
932
932
 
933
+ def vkimage(self, files, steps, **kwargs):
934
+ '''Wrapper for solving vkimage captcha.
935
+
936
+ Parameters
937
+ __________
938
+ file : str
939
+ Captcha image as a file or base64.
940
+ steps: str
941
+ Array of steps.
942
+ proxy : dict, optional
943
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
944
+ '''
945
+
946
+ if isinstance(files, str):
947
+
948
+ payload = self.get_method(files)
949
+ payload.pop('method', None)
950
+
951
+ result = self.solve(method='vkimage', steps=steps, **payload, **kwargs)
952
+ return result
953
+
954
+ elif isinstance(files, dict):
955
+ files = list(files.values())
956
+
957
+ files = self.extract_files(files)
958
+
959
+ result = self.solve(method='vkimage',
960
+ files=files,
961
+ steps=steps,
962
+ **kwargs)
963
+ return result
964
+
965
+ def vkcaptcha(self, redirect_uri, userAgent, proxy, **kwargs):
966
+ '''Wrapper for solving VK captcha using tokens.
967
+
968
+ Parameters
969
+ __________
970
+ redirect_uri : str
971
+ The URL that is returned for requests to the captchas API.
972
+ userAgent : str
973
+ User-Agent of the browser that will be used by the employee when loading the captcha.
974
+ proxy : dict
975
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
976
+ '''
977
+
978
+
979
+ result = self.solve(method='vkcaptcha',
980
+ redirect_uri=redirect_uri,
981
+ useragent=userAgent,
982
+ proxy=proxy,
983
+ **kwargs)
984
+ return result
985
+
986
+ def captchafox(self, sitekey, pageurl, userAgent, proxy, **kwargs):
987
+ '''Wrapper for solving CaptchaFox using tokens.
988
+
989
+ Parameters
990
+ __________
991
+ sitekey : str
992
+ The sitekey parameter value found on the page or in network requests.
993
+ pageurl : str
994
+ Full URL of the page with captcha.
995
+ userAgent : str
996
+ User-Agent of the browser that will be used by the employee when loading the captcha.
997
+ proxy : dict
998
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
999
+ '''
1000
+
1001
+
1002
+ result = self.solve(method='captchafox',
1003
+ sitekey=sitekey,
1004
+ pageurl=pageurl,
1005
+ useragent=userAgent,
1006
+ proxy=proxy,
1007
+ **kwargs)
1008
+ return result
1009
+
1010
+ def prosopo(self, sitekey, pageurl, **kwargs):
1011
+ '''Wrapper for solving Prosopo captcha using tokens.
1012
+
1013
+ Parameters
1014
+ __________
1015
+ sitekey : str
1016
+ The sitekey parameter value found on the page or in network requests.
1017
+ pageurl : str
1018
+ Full URL of the page with captcha.
1019
+ proxy : dict, optional
1020
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
1021
+ '''
1022
+
1023
+
1024
+ result = self.solve(method='prosopo',
1025
+ sitekey=sitekey,
1026
+ pageurl=pageurl,
1027
+ **kwargs)
1028
+ return result
1029
+
933
1030
  def datadome(self, captcha_url, pageurl, userAgent, proxy, **kwargs):
934
1031
  """Wrapper for solving DataDome Captcha.
935
1032
 
@@ -1,13 +0,0 @@
1
- 2captcha_python-2.0.0.dist-info/licenses/LICENSE,sha256=sbILKjQcxUC6dAvBbivnRX9YCshBI9XRvvk1LGkpMEo,1065
2
- twocaptcha/__init__.py,sha256=WoyFQiLTO_ucaTRiLgq4a4QBcBAdyD-NqFLNdqTe_fA,542
3
- twocaptcha/api.py,sha256=vlYOhc3rGIHOVGq4hZjJ54tUxBpBzI2FgWPctllb7D0,2826
4
- twocaptcha/async_api.py,sha256=L467rsgdVVrgWaLkvengoTE8GvCgQAfM2PmVO2kfad4,3534
5
- twocaptcha/async_solver.py,sha256=9ru1pJFx_xGk-KaPGKibBe3Ky2J0ZFPjgI2J5YFxg08,46062
6
- twocaptcha/solver.py,sha256=R16oosWn-f-qy-ik-OzD5KvX7uPmBq5AiR2awLMZOOw,52584
7
- twocaptcha/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- twocaptcha/exceptions/api.py,sha256=N810fZxcNE2AwCM9EyFrXpDpzAKsKi_tHCnRJn4CH7s,86
9
- twocaptcha/exceptions/solver.py,sha256=hvKUebPMvC51ve6MSmv_3q1J9vkhS90XO2ivoVToyoU,255
10
- 2captcha_python-2.0.0.dist-info/METADATA,sha256=HLdXVcfy40ep7aHOIwdOrMtMRdRFAS_LxvhaZhD5ufI,28396
11
- 2captcha_python-2.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
- 2captcha_python-2.0.0.dist-info/top_level.txt,sha256=AvFZdM89oM6Vo97ZTxT9AxHWpwoO3_Qf5ORMV3NClFE,11
13
- 2captcha_python-2.0.0.dist-info/RECORD,,