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:
Sarath Kaul
2019-11-12 16:41:54 +05:30
committed by Christian Clauss
parent 5ac4391420
commit b7e37a856f
2 changed files with 19 additions and 2 deletions

View File

@ -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>")