puppeteer-cn
Puppeteer lives in China
As we know, the Google's servers are hard to access in China, But puppeteer relies on Chromium or Chrome59+. You can try puppeteer-cn
if encounter the problem.
众所周知,天朝很难访问google的服务器,但是puppeteer又依赖Chromium/Chrome59+。如果遇到这个问题,你可以尝试下puppeteer-cn
。
Install
npm install puppeteer-cn --save
Usage
Same as puppeteer, you can replace puppeteer
with puppeteer-cn
. But it first checks your local Chrome version is greater than 59, then decides whether to install Chromium by a fast mirror.
和puppeteer完全一样,你完全可以用puppeteer-cn
代替之。这个包会先去检测本地Chrome版本是否大于59,再决定是否通过一个国内源下载Chromium。
const puppeteer = ; async { const browser = await puppeteer; const page = await browser; await page; await page; await browser;};
If you use puppeteer/DeviceDescriptors
in some scenarios, you can do that:
某些场景下如果需要使用puppeteer/DeviceDescriptors
,你可以这样做:
const puppeteer = ;const devices = ;const iPhone = devices'iPhone 6'; puppeteer;
License
MIT