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" `

## Install Prerender

`bash $ pip install -U prerender `

## Start Prerender

As standalone application:

`bash $ prerender `

To run it under gunicorn, first install some dependencies:

`bash $ pip install sanic-gunicorn `

Then:

`bash $ gunicorn --bind 0.0.0.0:3000 --worker-class sanic_gunicorn.Worker prerender.app:app `

## Configure client

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

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

Uploaded Source

Built Distribution

prerender-0.2.12-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for prerender-0.2.12.tar.gz
Algorithm Hash digest
SHA256 d672c960e306c21b3d537855f3f58c695a74646d592245f00e1b96df05c0197c
MD5 d0b038e60ce79195f1d8f5ab37d1a354
BLAKE2b-256 0d7f7f3f71952394b23175545473bdef4b2b441837b9e18bd7bb7198e3bd9d4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prerender-0.2.12-py3-none-any.whl
Algorithm Hash digest
SHA256 964a7327c843de7d241c871aa19f987e5d869015860f58061d23fe5d905f9d9c
MD5 18286972c80befc8b60d4907440d0dfc
BLAKE2b-256 ec3122cdd286a4a2e04f9c768756428df6a4195ddf3663cfcffc351c42422fdb

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