Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyppeteer v2.0.0 first run Chromium downloadable #472

Open
Cuikenn opened this issue Apr 15, 2024 · 2 comments
Open

Pyppeteer v2.0.0 first run Chromium downloadable #472

Cuikenn opened this issue Apr 15, 2024 · 2 comments

Comments

@Cuikenn
Copy link

Cuikenn commented Apr 15, 2024

[INFO] Starting Chromium download.
Traceback (most recent call last):
File "E:\PycharmProjects\pp\ppp.py", line 20, in
asyncio.get_event_loop().run_until_complete(main())
File "C:\Users\pc\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "E:\PycharmProjects\pp\ppp.py", line 11, in main
browser = await launch() # 启动浏览器
File "E:\PycharmProjects\pp.venv\lib\site-packages\pyppeteer\launcher.py", line 307, in launch
return await Launcher(options, **kwargs).launch()
File "E:\PycharmProjects\pp.venv\lib\site-packages\pyppeteer\launcher.py", line 120, in init
download_chromium()
File "E:\PycharmProjects\pp.venv\lib\site-packages\pyppeteer\chromium_downloader.py", line 138, in download_chromium
extract_zip(download_zip(get_url()), DOWNLOADS_FOLDER / REVISION)
File "E:\PycharmProjects\pp.venv\lib\site-packages\pyppeteer\chromium_downloader.py", line 82, in download_zip
raise OSError(f'Chromium downloadable not found at {url}: ' f'Received {r.data.decode()}.\n')
OSError: Chromium downloadable not found at https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1181205/chrome-win.zip: Received NoSuchKeyThe specified key does not exist.

No such object: chromium-browser-snapshots/Win_x64/1181205/chrome-win.zip
.

I try to visit this url: https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1181205/chrome-win.zip
But it's not found.Please check the chromium version 1181205 is exist.

@J4RF
Copy link

J4RF commented May 14, 2024

The package enforces a specific Chromium revision for no good reason, and in this release it's a revision that doesn't exist for Windows. Well done folks...

You can manually download the latest Chromium revision for Windows (.zip) here: https://chromium.woolyss.com/download/en/, then create a folder called 1181205 in C:\Users<username>\AppData\Local\pyppeteer\pyppeteer\local-chromium, and drag the extracted chrome-win folder into the 1181205 folder.

@Alashmony
Copy link

I changed the chrome downloader on my windows as follows:

`DOWNLOADS_FOLDER = Path(pyppeteer_home) / 'local-chromium'
DEFAULT_DOWNLOAD_HOST = 'https://www.googleapis.com'
DOWNLOAD_HOST = os.environ.get('PYPPETEER_DOWNLOAD_HOST', DEFAULT_DOWNLOAD_HOST)
BASE_URL = f'{DOWNLOAD_HOST}/storage/v1/b/chromium-browser-snapshots/o'

REVISION = os.environ.get('PYPPETEER_CHROMIUM_REVISION', chromium_revision)

NO_PROGRESS_BAR = os.environ.get('PYPPETEER_NO_PROGRESS_BAR', '')
if NO_PROGRESS_BAR.lower() in ('1', 'true'):
NO_PROGRESS_BAR = True # type: ignore

windowsArchive = 'chrome-win'

downloadURLs = {
'linux': f'{BASE_URL}/Linux_x64/{REVISION}/chrome-linux.zip',
'mac': f'{BASE_URL}/Mac/{REVISION}/chrome-mac.zip',
'win32': f'{BASE_URL}/Win/{REVISION}/{windowsArchive}.zip',
#'win64': f'{BASE_URL}/Win_x64/{REVISION}/{windowsArchive}.zip',
'win64' : f'{BASE_URL}/Win_x64%2F1304219%2F{windowsArchive}.zip?alt=media',

}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants