Skip to main content

Render JavaScript-rendered page as HTML using headless Chrome

Project description

# prerender

Render JavaScript-rendered page as HTML using headless Chrome

## Install Chrome Headless

Chrome Headless broweser can be easily installed using Docker:

`bash $ docker pull yukinying/chrome-headless `

## Start Chrome Headless

`bash $ docker run -i -t --shm-size=256m --rm --name=chrome-headless -p=127.0.0.1:9222:9222 yukinying/chrome-headless "about:blank" `

Or you can download a Headless Chrome binary for Ubuntu 16.04 from GitHub release and run it:

`bash $ wget https://github.com/bosondata/prerender/releases/download/v0.3.0/ChromeHeadless.ubuntu-16.04-x86_64.tar.gz $ tar zxvf ChromeHeadless.ubuntu-16.04-x86_64.tar.gz $ cd ChromeHeadless $ ./headless_shell --remote-debugging-port=9222 --disable-gpu "about:blank" `

## Install Prerender

`bash $ pip install -U prerender `

## Start Prerender

As standalone application:

`bash $ prerender `

To run it under gunicorn:

`bash $ gunicorn --bind 0.0.0.0:3000 --worker-class sanic.worker.GunicornWorker prerender.app:app `

## Configure client

Please view the original NodeJs version [prerender](https://github.com/prerender/prerender#official-middleware) README.

## License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prerender-0.7.0.dev1.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

prerender-0.7.0.dev1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file prerender-0.7.0.dev1.tar.gz.

File metadata

File hashes

Hashes for prerender-0.7.0.dev1.tar.gz
Algorithm Hash digest
SHA256 7004134fac980d89c1edd270740c477bf8ec78efbd69dc44f561764aff2e2ac8
MD5 74eeea5186c531d7bdaed34dea53ca6b
BLAKE2b-256 d26e0ae0487b9df22ea888db0034ad52ea06b69319e0f99ecbc6f2747874dd41

See more details on using hashes here.

File details

Details for the file prerender-0.7.0.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for prerender-0.7.0.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8ca25093a3ce1e198ac4e7accb124aa92a6397d3e256f255c38a4ddf847d8cd
MD5 dfe3cc9df5d71a65939c2327fc69a979
BLAKE2b-256 fbf56409a452f0daa3f202e458f83c3a0c32f751b693f3a9d52bc5fd99fa891f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page