Skip to content

Commit 2c36fff

Browse files
committed
Merge branch 'master' of github.com:Gerapy/GerapyPyppeteer
2 parents e6a502e + c66975e commit 2c36fff

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,3 +330,40 @@ Outputs:
330330
2020-07-13 01:49:27 [gerapy.pyppeteer] DEBUG: close pyppeteer
331331
...
332332
```
333+
334+
## Trouble Shooting
335+
336+
### Pyppeteer does not start properly
337+
338+
Chromium download speed is too slow, it can not be used normally.
339+
340+
Here are two solutions:
341+
342+
#### Solution 1 (Recommended)
343+
344+
Modify drive download source at `pyppeteer/chromium_downloader.py` line 22:
345+
346+
```python
347+
# Default:
348+
DEFAULT_DOWNLOAD_HOST = 'https://storage.googleapis.com'
349+
# modify
350+
DEFAULT_DOWNLOAD_HOST = http://npm.taobao.org/mirror
351+
```
352+
353+
#### Solution 2
354+
355+
Modify drive execution path at `pyppeteer/chromium_downloader.py` line 45:
356+
357+
```python
358+
# Default:
359+
chromiumExecutable = {
360+
'linux': DOWNLOADS_FOLDER / REVISION / 'chrome-linux' / 'chrome',
361+
'mac': (DOWNLOADS_FOLDER / REVISION / 'chrome-mac' / 'Chromium.app' /
362+
'Contents' / 'MacOS' / 'Chromium'),
363+
'win32': DOWNLOADS_FOLDER / REVISION / windowsArchive / 'chrome.exe',
364+
'win64': DOWNLOADS_FOLDER / REVISION / windowsArchive / 'chrome.exe',
365+
}
366+
```
367+
368+
You can find your own operating system, modify your chrome or chrome executable path.
369+

0 commit comments

Comments
 (0)