Program: Get Steam Games from Profile

import requests
import re
import pandas as pd

# Grab text between the double quotes after "name": (? makes it non-greedy.)
regexName = re.compile('"name":"(.*?)"'.strip())

def getSteamGames(steamUserName):
    # Create the URL based on the passed-in username.
    strURL = 'https://steamcommunity.com/id/' + steamUserName + '/games/?tab=all'
    # Download the page.
    res = requests.get(strURL)
    # Check to make sure it downloaded properly.
    res.raise_for_status()
    # Find all of the game names from the page.
    names = regexName.findall(res.text)

    # Copy the list to the clipboard, ready to be inserted into excel.
    pd.DataFrame(names).to_clipboard(excel=True, header=False, index=False)