mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
Added a new Python script and some changes in existing one (#1560)
* Python Program that fetches top trending news * Python Program that fetches top trending news * Revisions in Fetch BBC News * psf/black Changes * Python Program to send slack message to a channel * Slack Message Revision Changes
This commit is contained in:

committed by
Christian Clauss

parent
5ac4391420
commit
b7e37a856f
@ -2,7 +2,6 @@
|
||||
|
||||
import requests
|
||||
|
||||
# Enter Your API Key in following URL
|
||||
_NEWS_API = "https://newsapi.org/v1/articles?source=bbc-news&sortBy=top&apiKey="
|
||||
|
||||
|
||||
@ -14,5 +13,5 @@ def fetch_bbc_news(bbc_news_api_key: str) -> None:
|
||||
print(f"{i}.) {article['title']}")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == "__main__":
|
||||
fetch_bbc_news(bbc_news_api_key="<Your BBC News API key goes here>")
|
||||
|
Reference in New Issue
Block a user