isrpa 1.0.8__py3-none-any.whl → 1.0.9__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
@@ -102,19 +102,21 @@ def get_active_url(user_name):
102
102
  page.get("title") == "MagicalAutomator-sidePanel"
103
103
  ):
104
104
  continue
105
- else:
106
- if page.get("url") == "chrome://newtab/":
107
- return "chrome://new-tab-page/"
108
- return page.get("url")
105
+ # else:
106
+ # if page.get("url") == "chrome://newtab/":
107
+ # return "chrome://new-tab-page/"
108
+ return page.get("id")
109
109
  return None
110
110
 
111
111
 
112
- def get_active_page(browser, active_url):
112
+ def get_active_page(browser, active_page_id):
113
113
  """
114
114
  获取当前激活page对象
115
115
  """
116
116
  for page in browser.contexts[0].pages:
117
- if page.url == active_url:
117
+ client = page.context.new_cdp_session(page)
118
+ target_info = client.send("Target.getTargetInfo")
119
+ if target_info.get('targetInfo').get('targetId') == active_page_id:
118
120
  page.bring_to_front()
119
121
  return page
120
122
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: isrpa
3
- Version: 1.0.8
3
+ Version: 1.0.9
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=mXRTyp63Ycwp_ae4-2uCDz1mmehtlkTRmw_AL2AguVI,5524
9
- isrpa-1.0.8.dist-info/METADATA,sha256=Z1JIk12dgN2Kmexo33WxLm0zTcN9F1exgXwRtdg5HiI,511
10
- isrpa-1.0.8.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
11
- isrpa-1.0.8.dist-info/top_level.txt,sha256=J5HJbtR2WAeKnW1rrpkiuapwnlswv3RgM-riyZD87o0,6
12
- isrpa-1.0.8.dist-info/RECORD,,
8
+ isrpa/utils.py,sha256=HTX3luyrOayq9bBLyNLdLkANSntp5LdFGWXps1Dknsc,5682
9
+ isrpa-1.0.9.dist-info/METADATA,sha256=E7FUX5kvfZ02XgMygRPCSDcZiznw-rri2L9rH-OFp2s,511
10
+ isrpa-1.0.9.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
11
+ isrpa-1.0.9.dist-info/top_level.txt,sha256=J5HJbtR2WAeKnW1rrpkiuapwnlswv3RgM-riyZD87o0,6
12
+ isrpa-1.0.9.dist-info/RECORD,,
File without changes