isrpa 1.1.0__py3-none-any.whl → 1.1.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.
isrpa/utils.py CHANGED
@@ -24,13 +24,10 @@ def getPath(user_name):
24
24
  :return:
25
25
  """
26
26
 
27
- # address = os.environ.get("address", "192.168.12.249")
28
-
29
27
  url = f"{address}/client/getPath"
30
28
  headers = {
31
- 'Content-Type': 'application/json', # 说明请求体是 JSON 格式
29
+ 'Content-Type': 'application/json',
32
30
  }
33
- # 请求体的数据
34
31
  data = {
35
32
  'user_name': user_name
36
33
  }
@@ -64,7 +61,7 @@ def get_ssh_path(user_name):
64
61
 
65
62
  def get_ws_url():
66
63
  url = f"http://localhost:{port}/json/version"
67
- response = requests.get(url)
64
+ response = requests.get(url, headers={"Connection": "close"}, stream=True)
68
65
  if response.status_code != 200:
69
66
  return "failure"
70
67
  return response.json().get('webSocketDebuggerUrl')
@@ -88,7 +85,7 @@ def get_url(user_name):
88
85
 
89
86
  def get_json():
90
87
  url = f"http://localhost:{port}/json"
91
- response = requests.get(url)
88
+ response = requests.get(url, headers={"Connection": "close"}, stream=True)
92
89
  if response.status_code != 200:
93
90
  return "failure"
94
91
  return response.json()
@@ -123,7 +120,7 @@ def get_active_url(user_name):
123
120
 
124
121
  def get_json():
125
122
  url = f"http://localhost:{port}/json"
126
- response = requests.get(url)
123
+ response = requests.get(url, headers={"Connection": "close"}, stream=True)
127
124
  if response.status_code != 200:
128
125
  return "failure"
129
126
  return response.json()
@@ -137,9 +134,6 @@ def get_active_url(user_name):
137
134
  page.get("title") == "MagicalAutomator-sidePanel"
138
135
  ):
139
136
  continue
140
- # else:
141
- # if page.get("url") == "chrome://newtab/":
142
- # return "chrome://new-tab-page/"
143
137
  return page.get("id")
144
138
  return None
145
139
 
@@ -169,12 +163,10 @@ def upload_file(file_path, dest_file, user_name):
169
163
  :return:
170
164
  """
171
165
 
172
- # address = os.environ.get("address", "192.168.12.249")
173
166
  url = f"{address}/client/noticeUpload"
174
167
  headers = {
175
- 'Content-Type': 'application/json', # 说明请求体是 JSON 格式
168
+ 'Content-Type': 'application/json',
176
169
  }
177
- # 请求体的数据
178
170
  data = {
179
171
  'file_path': file_path,
180
172
  'dest_file': dest_file,
@@ -194,10 +186,9 @@ def vCode(image: str, code_type, apiKey, secretKey):
194
186
  """
195
187
  url = "https://ai.i-search.com.cn/ocr/v2/vCode"
196
188
  headers = {
197
- 'Content-Type': 'application/json', # 说明请求体是 JSON 格式
189
+ 'Content-Type': 'application/json',
198
190
  }
199
191
 
200
- # 请求体的数据
201
192
  data = {
202
193
  'image': image,
203
194
  'code_type': code_type,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: isrpa
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: isrpa package
5
5
  Home-page: https://github.com/yourusername/mypackage
6
6
  Author: ysq
@@ -5,8 +5,8 @@ isrpa/__init__.py,sha256=pG-YPVG0gJIJ6s4xcAz9S_CnUxpUcz33wl9eNUSgxGk,20
5
5
  isrpa/credentials.py,sha256=5paT4rxtZIUPqADmi1bLkoSKEYoosgS7rIjrJsgMNIs,3350
6
6
  isrpa/llm_chat.py,sha256=jTuK9wcm3X36V9lXuGuTCdNup_zi2NeG2GuYHzO7gm4,1541
7
7
  isrpa/message.py,sha256=N0s6hMaC5S-Pi4EhwcSp-ngfBTBQyW6ymU9sI9dUSeE,11329
8
- isrpa/utils.py,sha256=tN270H9E_NK3bc-FnUX0fONjvb52yskBBMD0pUMf-ug,6819
9
- isrpa-1.1.0.dist-info/METADATA,sha256=jeFGuZLYUJ42huP0r-gliPCx6yvoMhhbAnUKpypIQJ0,511
10
- isrpa-1.1.0.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
11
- isrpa-1.1.0.dist-info/top_level.txt,sha256=J5HJbtR2WAeKnW1rrpkiuapwnlswv3RgM-riyZD87o0,6
12
- isrpa-1.1.0.dist-info/RECORD,,
8
+ isrpa/utils.py,sha256=opHSj0unbVPaeQid2_Lgyub1YbEJFGtUzZF0_JnvcVE,6516
9
+ isrpa-1.1.1.dist-info/METADATA,sha256=pOEYQHr7xRAavJC2PcgRsBPsPDmC918dvO-yFuAJdNo,511
10
+ isrpa-1.1.1.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
11
+ isrpa-1.1.1.dist-info/top_level.txt,sha256=J5HJbtR2WAeKnW1rrpkiuapwnlswv3RgM-riyZD87o0,6
12
+ isrpa-1.1.1.dist-info/RECORD,,
File without changes