qrpa 1.0.40__tar.gz → 1.0.41__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.

Potentially problematic release.


This version of qrpa might be problematic. Click here for more details.

Files changed (33) hide show
  1. {qrpa-1.0.40 → qrpa-1.0.41}/PKG-INFO +1 -1
  2. {qrpa-1.0.40 → qrpa-1.0.41}/pyproject.toml +1 -1
  3. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/fun_web.py +3 -6
  4. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa.egg-info/PKG-INFO +1 -1
  5. {qrpa-1.0.40 → qrpa-1.0.41}/README.md +0 -0
  6. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/RateLimitedSender.py +0 -0
  7. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/__init__.py +0 -0
  8. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/db_migrator.py +0 -0
  9. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/feishu_bot_app.py +0 -0
  10. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/feishu_client.py +0 -0
  11. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/feishu_logic.py +0 -0
  12. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/fun_base.py +0 -0
  13. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/fun_excel.py +0 -0
  14. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/fun_file.py +0 -0
  15. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/fun_win.py +0 -0
  16. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/shein_daily_report_model.py +0 -0
  17. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/shein_excel.py +0 -0
  18. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/shein_lib.py +0 -0
  19. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/shein_sqlite.py +0 -0
  20. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/shein_ziniao.py +0 -0
  21. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/temu_chrome.py +0 -0
  22. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/temu_excel.py +0 -0
  23. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/temu_lib.py +0 -0
  24. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/time_utils.py +0 -0
  25. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/time_utils_example.py +0 -0
  26. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/wxwork.py +0 -0
  27. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa.egg-info/SOURCES.txt +0 -0
  28. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa.egg-info/dependency_links.txt +0 -0
  29. {qrpa-1.0.40 → qrpa-1.0.41}/qrpa.egg-info/top_level.txt +0 -0
  30. {qrpa-1.0.40 → qrpa-1.0.41}/setup.cfg +0 -0
  31. {qrpa-1.0.40 → qrpa-1.0.41}/setup.py +0 -0
  32. {qrpa-1.0.40 → qrpa-1.0.41}/tests/test_db_migrator.py +0 -0
  33. {qrpa-1.0.40 → qrpa-1.0.41}/tests/test_wxwork.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qrpa
3
- Version: 1.0.40
3
+ Version: 1.0.41
4
4
  Summary: qsir's rpa library
5
5
  Author: QSir
6
6
  Author-email: QSir <1171725650@qq.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qrpa"
7
- version = "1.0.40"
7
+ version = "1.0.41"
8
8
  description = "qsir's rpa library"
9
9
  authors = [{ name = "QSir", email = "1171725650@qq.com" }]
10
10
  readme = "README.md"
@@ -5,7 +5,6 @@ from playwright.sync_api import Page
5
5
  from .fun_base import log, send_exception
6
6
  from .time_utils import get_current_datetime
7
7
 
8
-
9
8
  def fetch(page: Page, url: str, params: Optional[Union[dict, list, str]] = None, headers: Optional[dict] = None, config:
10
9
  Optional[dict] = None) -> dict:
11
10
  """
@@ -23,6 +22,7 @@ Optional[dict] = None) -> dict:
23
22
  raise ValueError("headers 参数必须是 dict 或 None")
24
23
 
25
24
  try:
25
+ page.wait_for_load_state('load')
26
26
  response = page.evaluate("""
27
27
  async ({ url, params, extraHeaders }) => {
28
28
  try {
@@ -64,7 +64,6 @@ Optional[dict] = None) -> dict:
64
64
  raise send_exception()
65
65
  # return {"error": "fetch error", "message": str(e)}
66
66
 
67
-
68
67
  def fetch_via_iframe(page: Page, target_domain: str, url: str, params: Optional[Union[dict, list, str]] = None, config:
69
68
  Optional[dict] = None) -> dict:
70
69
  """
@@ -126,9 +125,8 @@ Optional[dict] = None) -> dict:
126
125
 
127
126
  return response
128
127
  except Exception as e:
129
- raise send_exception()
130
- # return {"error": "iframe_exception", "message": str(e)}
131
-
128
+ raise send_exception()
129
+ # return {"error": "iframe_exception", "message": str(e)}
132
130
 
133
131
  # 找到一个页面里面所有的iframe
134
132
  def find_all_iframe(page: Page):
@@ -137,7 +135,6 @@ def find_all_iframe(page: Page):
137
135
  log("找到 iframe:", frame.url)
138
136
  return [frame.url for frame in frames]
139
137
 
140
-
141
138
  # 全屏幕截图
142
139
  def full_screen_shot(web_page: Page, config):
143
140
  # 设置页面的视口大小为一个较大的值,确保截图高清
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qrpa
3
- Version: 1.0.40
3
+ Version: 1.0.41
4
4
  Summary: qsir's rpa library
5
5
  Author: QSir
6
6
  Author-email: QSir <1171725650@qq.com>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes