import requests from bs4 import BeautifulSoup import pyttsx3 import datetime def get_international_day(): # Fetching the international day webpage url = 'https://www.daysoftheyear.com/' response = requests.get(url) soup = BeautifulSoup(response.text, 'html.parser') # Finding the international day day = soup.find(class_='card-header-title').get_text().strip() return day def announce(day): # Initialize the text-to-speech engine engine = pyttsx3.init() engine.say(f"Today is {day}.") engine.runAndWait() def main(): # […]
Read more of this post
No comments:
Post a Comment