MCPcopy Index your code
hub / github.com/geekcomputers/Python / speak_news

Function speak_news

JARVIS/JARVIS_2.0.py:63–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61
62
63def speak_news():
64 url = "http://newsapi.org/v2/top-headlines?sources=the-times-of-india&apiKey=yourapikey"
65 news = requests.get(url).text
66 news_dict = json.loads(news)
67 arts = news_dict["articles"]
68 speak("Source: The Times Of India")
69 speak("Todays Headlines are..")
70 for index, articles in enumerate(arts):
71 speak(articles["title"])
72 if index == len(arts) - 1:
73 break
74 speak("Moving on the next news headline..")
75 speak("These were the top headlines, Have a nice day Sir!!..")
76
77
78def sendEmail(to, content):

Callers 1

get_appFunction · 0.70

Calls 2

speakFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected