[simple@redhat_1 pyppetter]$ pyppeteer-install
[W:pyppeteer.chromium_downloader] start chromium download.
Download may take a few minutes.
Traceback (most recent call last):
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/connection.py", line 301, in connect
    conn = self._new_conn()
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f26e916d630>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/bin/pyppeteer-install", line 11, in <module>
    sys.exit(install())
  File "/usr/local/lib/python3.6/site-packages/pyppeteer/command.py", line 14, in install
    download_chromium()
  File "/usr/local/lib/python3.6/site-packages/pyppeteer/chromium_downloader.py", line 146, in download_chromium
    extract_zip(download_zip(get_url()), DOWNLOADS_FOLDER / REVISION)
  File "/usr/local/lib/python3.6/site-packages/pyppeteer/chromium_downloader.py", line 85, in download_zip
    data = http.request('GET', url, preload_content=False)
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/request.py", line 68, in request
    **urlopen_kw)
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/request.py", line 89, in request_encode_url
    return self.urlopen(method, url, **extra_kw)
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/poolmanager.py", line 324, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 667, in urlopen
    **response_kw)
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 667, in urlopen
    **response_kw)
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 667, in urlopen
    **response_kw)
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/home/simple/.local/lib/python3.6/site-packages/urllib3/util/retry.py", line 399, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Max retries exceeded with url: /chromium-browser-snapshots/Linux_x64/588429/chrome-linux.zip (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f26e916d630>: Failed to establish a new connection: [Errno 111] Connection refused',))

该问题有两个原因

1,urllib3的问题

解决办法
pip install -U "urllib3<1.25"

import sys
import os
import pyppeteer.chromium_downloader
def current_platform() -> str:
    """Get current platform name by short string."""
    if sys.platform.startswith('linux'):
        return 'linux'
    elif sys.platform.startswith('darwin'):
        return 'mac'
    elif (sys.platform.startswith('win') or
          sys.platform.startswith('msys') or
          sys.platform.startswith('cyg')):
        if sys.maxsize > 2 ** 31 - 1:
            return 'win64'
        return 'win32'
    raise OSError('Unsupported platform: ' + sys.platform)
platform = current_platform()
print('默认版本是:{}'.format(pyppeteer.__chromium_revision__))
print('平台下载链接为:{}'.format(pyppeteer.chromium_downloader.downloadURLs.get(platform)))
print('解压目录:{}'.format(
  os.path.dirname(os.path.dirname(pyppeteer.chromium_downloader.chromiumExecutable.get(platform)))

获取到下载地址后,想办法通过其他方式把该文件下载下来即可。
下载文件后,解压到chromium文件默认路径中。

安装pip3 install pyppeteer下载chromiumpyppeteer-install报错[simple@redhat_1 pyppetter]$ pyppeteer-install[W:pyppeteer.chromium_downloader] start chromium download.Download may take a few minutes.Traceback (most recent call last): File "/home/simple/.lo 使用Reuqests-html的render函数,它会在用户目录(默认是~/.pyppeteer/)中下载一个chromium,然后用它来执行JS代码。 执行之后,会下载chromium [W:pyppeteer.chromium_downloader] start chromium download. Download may take a few minutes.
在设计接口时,有很多因素要考虑,如接口的业务定位,接口的安全性,接口的可扩展性、接口的稳定性、接口的跨域性、接口的协议规则、接口的路径规则、接口单一原则、接口过滤和接口组合等诸多因素,本篇文章将简要分析这些因素。 一、规范性建议 1、职责原则 在设计接口时,必须明确接口的职责,即接口类型,接口应解决什么业务问题等。 2、单一性原则 在明确接口职责的条件下,尽量做到接口单一,即一个接口只做一件事,而非两件以上。很多非资深接口设计者,在设计接口时,总认为接口所做的事越多,越牛叉,这是非常严重的错误认识
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='www.baidu.com', port=443): Max retries exceeded with url: (Caused by <class 'socket.gaierror'>: python脚本请求url,大量请求报错Max retries exceeded with url requests.exceptions.ConnectionError: HTTPConnectionPool(host='baidu.com', port=80): Max retries exceeded with url: (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x2b09dfd00310>: Failed to establ
很多自己新装电脑的朋友,了解主要的构成部分不是很难,把几大件连接在一起也都不困难 ,但是到了插主板上的各种接线(特别是连接机箱的线)都很迷茫,有的时候完全不知道怎么 下手,下面的资料是以前从网上搜集来的自己学习的,并非原创,原出处不详了,再一次感谢 那些曾经给了我帮助的朋友,发出来也就是给那些需要自己新装电脑的朋友做个参考,无意 侵犯你们的著作权,老玩家要是觉得有什么地方说的不对的,也
Updating projects from gyp files... as: unrecognized option '-mfloat-abi=softfp' compiler_version.py failed to execute: arm-arago-linux-gnueabi-g++ -Xassembler --version -x assembler -c /dev/null
Chromium是一种基于开源代码的浏览器,它允许开发者通过JavaScript编写扩展程序和应用程序。在Chromium中,开发者可以使用加密算法来对数据进行保护,其中最流行的算法之一是AES(Advanced Encryption Standard)。 在使用AES进行加密之前,需要了解一些基本概念,例如密钥长度、加密模式和填充模式等。在加密时,需要使用一个密钥来进行加密和解密操作。密钥越长,加密的安全性会越高。加密模式是指如何对数据进行加密,有ECB、CBC、CFB和OFB等模式可选择。填充模式是指在加密时,如何对最后一个数据块进行填充。 在Chromium中,使用AES进行加密可以采用现成的加密库,例如CryptoJS,它提供了针对AES加密的方法,可以方便地在Chromium中进行调用。同时,也可以使用Web Crypto API来进行AES加密操作。Web Crypto API提供了一套标准的加密接口,在Chromium中可以直接使用。 总的来说,Chromium使用AES进行加密十分便捷,并且可以通过选择不同的加密模式和填充模式来满足不同的安全需求。开发者可以按照自己的需求选择适当的方法进行加密操作,从而保护数据安全。