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.

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

Uploaded Source

Built Distribution

prerender-0.3.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for prerender-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6531f4cf16cd0272ec1fd94bb0973fe7a4ca01765e91535303ba731a06c18963
MD5 fab1fba98d395a155f1018e9f32afaf1
BLAKE2b-256 851d5bbf316786831e9c093ca4b756b86db787cf9424578c4dba17a253b158c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prerender-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8888a0ccbb7afc478542d495cd5f1b64348185ccb751bb27d81c31a53e6cde7
MD5 13da8374315e432448f29f8d8de897dd
BLAKE2b-256 648ba7ba8d3a23a78133bbcc27d751ceeac8c1a72d5a93354cccf242646c6d53

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