From d7dce3dab62235a211b258d05751377f3d4f83ff Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Tue, 11 Jul 2023 15:26:04 -0700 Subject: [PATCH] Delete azpowerball.py --- azpowerball.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 azpowerball.py diff --git a/azpowerball.py b/azpowerball.py deleted file mode 100644 index 3158c08..0000000 --- a/azpowerball.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/python3 - -# Import BeautifulSoup -from bs4 import BeautifulSoup -import requests - -# Arizona Powerball API URL -myUrl = 'https://powerball.com/api/v1/numbers/powerball/recent10?_format=xml' - -try: - # Get winning Arizona Powerball numbers from powerball.com - response = requests.get(myUrl) - - # If we receive a response, proceed... - if response: - - # Store the response from the server into a bowl of soup - soup = BeautifulSoup(response.text, 'lxml') # load the response into BeautifulSoup - - # parse out the winning numbers - winningNumbers = soup.find('field_winning_numbers').contents - - # parse out the drawing date - drawingDate = soup.find('field_draw_date').contents - - # print out the winning numbers and drawing date - print(*winningNumbers,*drawingDate) - -# Notify user if we fail to get a response from server... -except Exception as e: - print('No response from powerball.com.') \ No newline at end of file