import requests
from requests_ip_rotator import ApiGateway, ALL_REGIONS

def createAWSSessions():
  NEW_ALL_REGIONS = ALL_REGIONS + [
      "ap-south-2",
      "ap-southeast-3",
      "ap-southeast-4",
      "ap-southeast-5",
      "ca-west-1",
      "eu-central-2",
      "eu-south-2",
      "il-central-1",
      "me-central-1",
  ]
  all_sessions = []
  for region in NEW_ALL_REGIONS:
      gateway = ApiGateway(
          "https://steamcommunity.com",
          access_key_id="AKIAVRYQ3XK3I75DLJEH",
          access_key_secret="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",
          regions=[str(region)],
      )
      gateway.start()
      aws_session = requests.Session()
      aws_session.mount("https://steamcommunity.com", gateway)
      all_sessions.append(aws_session)
  return all_sessions

def createAWSSessionLimited():
    all_sessions = []
    gateway = ApiGateway(
            "https://steamcommunity.com",
            access_key_id="AKIAVRYQ3XK3I75DLJEH",
            access_key_secret="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",
            regions=[str("eu-central-2")],
        )
    gateway.start()
    aws_session = requests.Session()
    aws_session.mount("https://steamcommunity.com", gateway)
    all_sessions.append(aws_session)
    return all_sessions

def createAWSSessionsCSFloat():
    NEW_ALL_REGIONS = ALL_REGIONS + [
      "ap-south-2",
      "ap-southeast-3",
      "ap-southeast-4",
      "ap-southeast-5",
      "ca-west-1",
      "eu-central-2",
      "eu-south-2",
      "il-central-1",
      "me-central-1",
  ]
    all_sessions = []
    for region in NEW_ALL_REGIONS:
        gateway = ApiGateway(
            "https://csfloat.com",
            access_key_id="AKIAVRYQ3XK3I75DLJEH",
            access_key_secret="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",
            regions=[str(region)],
        )
        gateway.start()
        aws_session = requests.Session()
        aws_session.mount("https://csfloat.com", gateway)
        all_sessions.append(aws_session)
    return all_sessions
