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.
- {qrpa-1.0.40 → qrpa-1.0.41}/PKG-INFO +1 -1
- {qrpa-1.0.40 → qrpa-1.0.41}/pyproject.toml +1 -1
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/fun_web.py +3 -6
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa.egg-info/PKG-INFO +1 -1
- {qrpa-1.0.40 → qrpa-1.0.41}/README.md +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/RateLimitedSender.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/__init__.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/db_migrator.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/feishu_bot_app.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/feishu_client.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/feishu_logic.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/fun_base.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/fun_excel.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/fun_file.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/fun_win.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/shein_daily_report_model.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/shein_excel.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/shein_lib.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/shein_sqlite.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/shein_ziniao.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/temu_chrome.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/temu_excel.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/temu_lib.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/time_utils.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/time_utils_example.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa/wxwork.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa.egg-info/SOURCES.txt +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa.egg-info/dependency_links.txt +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/qrpa.egg-info/top_level.txt +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/setup.cfg +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/setup.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/tests/test_db_migrator.py +0 -0
- {qrpa-1.0.40 → qrpa-1.0.41}/tests/test_wxwork.py +0 -0
|
@@ -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
|
-
|
|
130
|
-
|
|
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
|
# 设置页面的视口大小为一个较大的值,确保截图高清
|
|
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
|
|
File without changes
|
|
File without changes
|