isrpa 0.6__py3-none-any.whl → 0.8__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.
isrpa/OCR.py CHANGED
@@ -1,7 +1,7 @@
1
1
  import base64
2
2
  import json
3
3
  import requests
4
- from Node_example.Other.Template_Exception import *
4
+ from Template_Exception import *
5
5
 
6
6
 
7
7
  def OCR_frome_image_path(img_path, apiKey, secretKey, code_type=8000, option='vCode'):
@@ -67,10 +67,14 @@ def OCR_from_image(img, apiKey, secretKey, code_type=8000, option='vCode'):
67
67
  try:
68
68
  result = response_data.get('result')
69
69
  except Exception:
70
- raise 无效参数
70
+ raise LoginFailed
71
71
  return result
72
72
 
73
- from isrpa import utils
73
+
74
74
  if __name__ == '__main__':
75
- path = utils.getPath("admin")
76
- print(path)
75
+ img_path = r'D:\Node_example\滑块验证码.png'
76
+ apiKey = "aa9b5dc8a35c4f93a10fb53e3aebbb0b"
77
+ secretKey = "eb50c22a83bd43daad6532722c8a921a"
78
+ code_type = 9000
79
+ result = OCR_frome_image_path(img_path, apiKey, secretKey, code_type)
80
+ print(result)
@@ -1,4 +1,4 @@
1
- class 登录失败(Exception):
1
+ class LoginFailed(Exception):
2
2
  """异常:登录失败"""
3
3
 
4
4
  def __init__(self, message="登录失败,请检查登录步骤"):
@@ -6,7 +6,7 @@ class 登录失败(Exception):
6
6
  super().__init__(self.message)
7
7
 
8
8
 
9
- class 文件不存在(Exception):
9
+ class FileNotFound(Exception):
10
10
  """异常:文件不存在"""
11
11
 
12
12
  def __init__(self, message="文件不存在,请检查文件路径"):
@@ -14,7 +14,7 @@ class 文件不存在(Exception):
14
14
  super().__init__(self.message)
15
15
 
16
16
 
17
- class 等待超时(Exception):
17
+ class Timeout(Exception):
18
18
  """异常:等待超时"""
19
19
 
20
20
  def __init__(self, message="等待超时"):
@@ -22,9 +22,9 @@ class 等待超时(Exception):
22
22
  super().__init__(self.message)
23
23
 
24
24
 
25
- class 无效参数(Exception):
25
+ class InvalidArgument(Exception):
26
26
  """异常:无效参数"""
27
27
 
28
28
  def __init__(self, message="输入参数无效"):
29
29
  self.message = message
30
- super().__init__(self.message)
30
+ super().__init__(self.message)
isrpa/message.py CHANGED
@@ -1,6 +1,6 @@
1
1
  import json
2
2
 
3
- from Node_example.Other.Template_Exception import *
3
+ from Template_Exception import *
4
4
 
5
5
 
6
6
  def action_message(page, message="等待用户操作", button_label="确认", button=True, time=180):
@@ -139,7 +139,7 @@ def action_message(page, message="等待用户操作", button_label="确认", bu
139
139
  try:
140
140
  page.wait_for_function("window.customButtonClicked === true", timeout=time * 1000)
141
141
  except Exception:
142
- raise 等待超时
142
+ raise Timeout
143
143
 
144
144
 
145
145
  def info_message(page, current_action="当前执行", message="网页操作"):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: isrpa
3
- Version: 0.6
3
+ Version: 0.8
4
4
  Summary: isrpa package
5
5
  Home-page: https://github.com/yourusername/mypackage
6
6
  Author: ysq
@@ -0,0 +1,10 @@
1
+ isrpa/OCR.py,sha256=mI4wagHGcsdfXm8MZP0kILxkeReOy9AcY4cF6O-vPt0,2503
2
+ isrpa/Template.py,sha256=UP1uovLvJzXEPGo_hzLrIYOu3vZP8Cf6m3G2hGzQ6XA,1958
3
+ isrpa/Template_Exception.py,sha256=an6eQ1NMB8a9R-J0yyMdwHIZcZeDtdV5f7fWKZQsZ3s,819
4
+ isrpa/__init__.py,sha256=pG-YPVG0gJIJ6s4xcAz9S_CnUxpUcz33wl9eNUSgxGk,20
5
+ isrpa/message.py,sha256=ak1ZZ8zDeXoYP0UXxrZK8yLie-5rUJ5VHwANTHpsLgQ,11323
6
+ isrpa/utils.py,sha256=bmcEvxfLhrWOFGUXpBSSsGlfD8qmJ-lCm8VHoYpEPEY,50851
7
+ isrpa-0.8.dist-info/METADATA,sha256=teh2LhNGJOrHkH6lTXH7LYpq0Ub5z4P0x4Gf3A2rriI,457
8
+ isrpa-0.8.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
9
+ isrpa-0.8.dist-info/top_level.txt,sha256=J5HJbtR2WAeKnW1rrpkiuapwnlswv3RgM-riyZD87o0,6
10
+ isrpa-0.8.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: bdist_wheel (0.41.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,10 +0,0 @@
1
- isrpa/OCR.py,sha256=fbBIcUiRoMVn_Yk7-I0MnuHNCtQdaKgRwIMhzGge3nc,2326
2
- isrpa/Template.py,sha256=UP1uovLvJzXEPGo_hzLrIYOu3vZP8Cf6m3G2hGzQ6XA,1958
3
- isrpa/Template_Exception.py,sha256=FdarwIMF8qHpcTYoEKF7Ru-pcKnt9NIoyuCSobKEphw,827
4
- isrpa/__init__.py,sha256=pG-YPVG0gJIJ6s4xcAz9S_CnUxpUcz33wl9eNUSgxGk,20
5
- isrpa/message.py,sha256=salmKkbxbVic7HlbHJQ1x9JhjjbQwJsvRa4tZ2JPY4M,11347
6
- isrpa/utils.py,sha256=bmcEvxfLhrWOFGUXpBSSsGlfD8qmJ-lCm8VHoYpEPEY,50851
7
- isrpa-0.6.dist-info/METADATA,sha256=DC-mWOVBff868CiIJByepZ8w2D_3Z8wU4rAId9bHIuY,457
8
- isrpa-0.6.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
9
- isrpa-0.6.dist-info/top_level.txt,sha256=J5HJbtR2WAeKnW1rrpkiuapwnlswv3RgM-riyZD87o0,6
10
- isrpa-0.6.dist-info/RECORD,,