import requests
# User-defined variables
owner = "replace_with_repository_owner"
repo = "replace_with_repository_name"
# GitHub API endpoint for getting repository information
url = f"https://api.github.com/repos/{owner}/{repo}"
# Send GET request to retrieve the repository data
response = requests.get(url)
# Check if the request was successful
if response.status_code == 200:
# Get the repository URL from the response
repository_url = response.json()["html_url"]
print(repository_url)
else:
print("Failed to retrieve the repository URL.")