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.dev0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for prerender-0.7.0.dev0.tar.gz
Algorithm Hash digest
SHA256 a8668e37f2541e4e20ef6f568778dfdc477d4131ef4b081ef5e0809c6f645aba
MD5 5cae1a5908574e850ab5bc3b3301754d
BLAKE2b-256 a6f7838b6abddddb14f798d4db5f04f34d71f986e4a13c5eab5f78ed53e1b6ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prerender-0.7.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 24ce2790b2b870c1571002086eba6f190ad6ab5505725bf49cc5f84a7b8844c9
MD5 48bd63cec72e98717ffded4a9f28de2b
BLAKE2b-256 0a339980a4e4bac0b47f76ff0418ff7f014c7776c39968e5fba921ed7358c87b

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