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 CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = '0.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
- # 如果是 <img> 标签,就尝试通过标签采集,采集不到再走屏幕截图。
1166
- # 因为 img 标签的图片最好接近原生图片,这样效果会更好,当然也可以配置 try_use_img=False 直接关掉这种图片获取方式,就用截图,那样比较统一。
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 作用于当前 url 页面,只能在访问页面后执行。
1965
- # list 是用于完美还原 cookies 状态,可以在访问页面前执行。
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
- # 初始化阶段,frame 并没有进去对象管理时才可能走的分支
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', // Safari 兼容
2557
- mozUserSelect: 'none', // Firefox 兼容
2558
- msUserSelect: 'none', // IE/Edge 兼容
2559
- zIndex: '2147483647', // 最大 z-index 确保置顶
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)
@@ -1,3 +1,3 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vchrome
3
- Version: 0.0.0
3
+ Version: 0.0.1
@@ -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,,
@@ -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,,