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

Uploaded Source

Built Distribution

prerender-0.6.1-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file prerender-0.6.1.tar.gz.

File metadata

  • Download URL: prerender-0.6.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for prerender-0.6.1.tar.gz
Algorithm Hash digest
SHA256 7df2591da1534bff904881b0329f406952795ab7edcb09a0006d5e9a6d974c69
MD5 19cd6410bf1191f2ba8649c62ac8e0d2
BLAKE2b-256 27eca63bf10a02a46589f985f46962a4f5953200fd1d552fec5c576f9201e929

See more details on using hashes here.

File details

Details for the file prerender-0.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for prerender-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 517df0244ae66db4158ebe47b0a3f064b866cb38d409e8d838f1acf8ead5cdca
MD5 d034703838ccbfa4b35cd51e92d642c6
BLAKE2b-256 c17502cd9ceca120c6b1977f0683e20e9ab044a2ee2024ef785f8ef854f658c0

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