Skip to content

Instantly share code, notes, and snippets.

@danquack
Created Jan 27, 2019
Embed
What would you like to do?
Example implementation of capturing traffic
# Example usage of https://github.com/danquack/Sitemap-Prerendering-S3
from os import environ
from prerender.prerender import Prerender
client = Prerender(robots_url="https://tournamentmgr.com/robots.txt",
s3_bucket=environ['s3_bucket'],
auth=(environ.get('username', None), environ.get('password', None)),
query_char_deliminator=' ',
allowed_domains=['tournamentmgr.com', 'amazonaws.com'])
# Entire page
client.capture()
# individual page
client.capture_page_and_upload("https://tournamentmgr.com/home")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment