vchrome 0.1.11__py3-none-any.whl → 0.1.13__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.1.11'
1
+ __version__ = '0.1.13'
2
2
  __author__ = 'v'
3
3
  # ----------------------------------------------------------------------------------------------------
4
4
  _allowed = {'Chrome'}
@@ -786,7 +786,7 @@ def cdp_client(hostname, port, debug=False, runtimeEnable=False, cfg={}):
786
786
  # request: Redirect.
787
787
  if 'responseHeaders' in rdata['params'] and type(rdata['params']['responseHeaders']) == list:
788
788
  for kv in rdata['params']['responseHeaders']:
789
- if kv['name'] == 'Location':
789
+ if kv['name'].lower() == 'location':
790
790
  return self.f.cdp('Fetch.continueRequest', {'requestId': requestId, 'url':kv['value']}, sessionId=rdata.get('sessionId'))
791
791
  # request: fail Request.
792
792
  if 'responseErrorReason' in rdata['params']:
@@ -797,6 +797,8 @@ def cdp_client(hostname, port, debug=False, runtimeEnable=False, cfg={}):
797
797
  waiter, on_request, on_response = self.call_change[k]
798
798
  if on_response:
799
799
  body_info = self.f.cdp("Fetch.getResponseBody", {"requestId": requestId}, sessionId=rdata.get('sessionId'))
800
+ if 'base64Encoded' not in body_info:
801
+ break
800
802
  body = base64.b64decode(body_info["body"]) if body_info['base64Encoded'] else body_info["body"].encode()
801
803
  x = SniffFetch.FetchResponse({
802
804
  "url": url,
@@ -1,4 +1,4 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vchrome
3
- Version: 0.1.11
3
+ Version: 0.1.13
4
4
 
@@ -0,0 +1,6 @@
1
+ v/__init__.py,sha256=6ZddLaDcwLudHWmFr2utAcYhperXw9AYoItNPm8EZSM,65
2
+ vchrome/__init__.py,sha256=573YdmXm9CHnE0IXbGV8_OhzMX9CV1TQRHB1heDFkyk,229113
3
+ vchrome-0.1.13.dist-info/METADATA,sha256=TK9eZNxl2LcjYmPO-VyjXuhw7xAFTom4XTDzgK1HxDo,57
4
+ vchrome-0.1.13.dist-info/WHEEL,sha256=hPN0AlP2dZM_3ZJZWP4WooepkmU9wzjGgCLCeFjkHLA,92
5
+ vchrome-0.1.13.dist-info/top_level.txt,sha256=IYbkbnFb2FGoroYj_ZXIitmnJDgYBA29_HmK9BdEUkY,10
6
+ vchrome-0.1.13.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- v/__init__.py,sha256=6ZddLaDcwLudHWmFr2utAcYhperXw9AYoItNPm8EZSM,65
2
- vchrome/__init__.py,sha256=9LYqVSuZahcPySY1fQZseDU8bR2gYVFlpm7GkZiJjrM,229000
3
- vchrome-0.1.11.dist-info/METADATA,sha256=xrfKhZxjyhM4rF6QQDkl4t_LTKPwvIMEr7I8MPexovQ,57
4
- vchrome-0.1.11.dist-info/WHEEL,sha256=hPN0AlP2dZM_3ZJZWP4WooepkmU9wzjGgCLCeFjkHLA,92
5
- vchrome-0.1.11.dist-info/top_level.txt,sha256=IYbkbnFb2FGoroYj_ZXIitmnJDgYBA29_HmK9BdEUkY,10
6
- vchrome-0.1.11.dist-info/RECORD,,