#!/usr/bin/python3

import requests
from requests_ip_rotator import ApiGateway

# Create gateway object and initialise in AWS
gateway = ApiGateway("http://fam-tille.de")
gateway.start()
print("gateway = ", gateway)

# Assign gateway to session
session = requests.Session()
session.mount("http://fam-tille.de", gateway)
print("session = ", session)

# Send request (IP will be randomised)
response = session.get("http://fam-tille.de/leblauf.html")
print(response.status_code)

# Delete gateways
gateway.shutdown()

