Example implementation of capturing traffic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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