ehhhhhhhh

This commit is contained in:
Tristan Smith 2024-03-20 21:00:51 -04:00
commit ca73e2dc54

21
main.py Normal file
View file

@ -0,0 +1,21 @@
import requests
import webbrowser
import random # Import the random module
def get_random_repo():
url = "https://api.github.com/repositories"
response = requests.get(url)
repos = response.json()
# Pick a random repo from the list of repos
random_repo = random.choice(repos)
return random_repo
def main():
repo = get_random_repo()
print(repo['html_url']) # Print the URL of the random repo
# Ensure the returned link opens in the default browser
webbrowser.open(repo['html_url'])
if __name__ == "__main__":
main()