vchrome 0.0.0__py3-none-any.whl → 0.0.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.
- vchrome/__init__.py +16 -14
- {vchrome-0.0.0.dist-info → vchrome-0.0.1.dist-info}/METADATA +1 -1
- vchrome-0.0.1.dist-info/RECORD +5 -0
- vchrome-0.0.0.dist-info/RECORD +0 -5
- {vchrome-0.0.0.dist-info → vchrome-0.0.1.dist-info}/WHEEL +0 -0
- {vchrome-0.0.0.dist-info → vchrome-0.0.1.dist-info}/top_level.txt +0 -0
vchrome/__init__.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
__version__ = '0.0.
|
|
1
|
+
__version__ = '0.0.1'
|
|
2
2
|
__author__ = 'v'
|
|
3
3
|
# ----------------------------------------------------------------------------------------------------
|
|
4
4
|
_allowed = {'Chrome'}
|
|
@@ -1100,7 +1100,7 @@ def cdp_client(hostname, port, debug=False):
|
|
|
1100
1100
|
raise Exception('wait show over time.')
|
|
1101
1101
|
time.sleep(0.08)
|
|
1102
1102
|
if pretime:
|
|
1103
|
-
time.sleep(pretime) #
|
|
1103
|
+
time.sleep(pretime) # When the component appears, the event might not have been attached yet. Please wait a moment.
|
|
1104
1104
|
def drag(self, x=1, y=2, zero='center', button='left', count=1):
|
|
1105
1105
|
self.wait_show()
|
|
1106
1106
|
self._set_in_view()
|
|
@@ -1162,8 +1162,9 @@ def cdp_client(hostname, port, debug=False):
|
|
|
1162
1162
|
self.wait_show()
|
|
1163
1163
|
if try_use_img and self.className == 'HTMLImageElement':
|
|
1164
1164
|
try:
|
|
1165
|
-
#
|
|
1166
|
-
#
|
|
1165
|
+
# If it’s an <img> tag, try to capture it via the element first; if that fails, fall back to a screenshot.
|
|
1166
|
+
# Images from <img> tags are best captured as native images for better quality.
|
|
1167
|
+
# Of course, you can also set try_use_img=False to disable this method and use screenshots only, which makes the process more uniform.
|
|
1167
1168
|
src = self['src']
|
|
1168
1169
|
if src:
|
|
1169
1170
|
if src.startswith('http'):
|
|
@@ -1961,8 +1962,8 @@ def cdp_client(hostname, port, debug=False):
|
|
|
1961
1962
|
# 'sourcePort': 443,
|
|
1962
1963
|
# 'sourceScheme': 'Secure',
|
|
1963
1964
|
# 'value': '2826F2D60D5E56C841B9E33F82051E8A'},...]
|
|
1964
|
-
# str
|
|
1965
|
-
# list
|
|
1965
|
+
# A str applies to the current URL page and can only be executed after visiting the page.
|
|
1966
|
+
# A list is used to perfectly restore the cookies state and can be executed before visiting the page.
|
|
1966
1967
|
raise Exception('cookies must be (str/list/CookieManager)')
|
|
1967
1968
|
def _get_remote_list(self):
|
|
1968
1969
|
_self = self
|
|
@@ -2196,7 +2197,8 @@ def cdp_client(hostname, port, debug=False):
|
|
|
2196
2197
|
else:
|
|
2197
2198
|
pf = finfo.get('parent')
|
|
2198
2199
|
if not pf:
|
|
2199
|
-
#
|
|
2200
|
+
# TODO
|
|
2201
|
+
# This branch is only taken during the initialization phase, when the frame has not yet entered object management.
|
|
2200
2202
|
return
|
|
2201
2203
|
lf = AbsFrame(rootf, {
|
|
2202
2204
|
"contextId": finfo.get("contextId"),
|
|
@@ -2551,13 +2553,13 @@ class Chrome:
|
|
|
2551
2553
|
height: '5px',
|
|
2552
2554
|
backgroundColor: 'red',
|
|
2553
2555
|
borderRadius: '50%',
|
|
2554
|
-
pointerEvents: 'none',
|
|
2555
|
-
userSelect: 'none',
|
|
2556
|
-
webkitUserSelect: 'none',
|
|
2557
|
-
mozUserSelect: 'none',
|
|
2558
|
-
msUserSelect: 'none',
|
|
2559
|
-
zIndex: '2147483647',
|
|
2560
|
-
willChange: 'transform',
|
|
2556
|
+
pointerEvents: 'none',
|
|
2557
|
+
userSelect: 'none',
|
|
2558
|
+
webkitUserSelect: 'none',
|
|
2559
|
+
mozUserSelect: 'none',
|
|
2560
|
+
msUserSelect: 'none',
|
|
2561
|
+
zIndex: '2147483647',
|
|
2562
|
+
willChange: 'transform',
|
|
2561
2563
|
});
|
|
2562
2564
|
document.body.appendChild(nDiv)
|
|
2563
2565
|
setTimeout(function(){ nDiv.remove(); },1000)
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
vchrome/__init__.py,sha256=3hGkPIEIEqdztxgUv_xzCfSh94LydiST-h0aRbbKcFo,205275
|
|
2
|
+
vchrome-0.0.1.dist-info/METADATA,sha256=sYEl8TU0KeoZfxt5CiNQCP9kl_jR6ztqpO9cHeOQzfk,54
|
|
3
|
+
vchrome-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
+
vchrome-0.0.1.dist-info/top_level.txt,sha256=oB919Fa09PCy48Ptj8iy-1QUcvhEeY97MOR42281Fk0,8
|
|
5
|
+
vchrome-0.0.1.dist-info/RECORD,,
|
vchrome-0.0.0.dist-info/RECORD
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
vchrome/__init__.py,sha256=0kIovhQyN2I2MGbc7GfqQxZoEBPxN4ALaiL5fk8utX8,205268
|
|
2
|
-
vchrome-0.0.0.dist-info/METADATA,sha256=Ir4Nm9UhfuSB1-rBnjIcDSXOsLBOAN1OvjIpNcyXBa4,54
|
|
3
|
-
vchrome-0.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
-
vchrome-0.0.0.dist-info/top_level.txt,sha256=oB919Fa09PCy48Ptj8iy-1QUcvhEeY97MOR42281Fk0,8
|
|
5
|
-
vchrome-0.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|