Spaces:
Running
Running
Update gather_news.py
Browse files- gather_news.py +1 -2
gather_news.py
CHANGED
|
@@ -4,7 +4,6 @@
|
|
| 4 |
# News Source Integration
|
| 5 |
# This script integrates with various news sources to fetch the latest articles from the specified news sources, extracts relevant information such as title, URL,Source,Author and Publish date.
|
| 6 |
|
| 7 |
-
import config
|
| 8 |
import requests
|
| 9 |
import feedparser
|
| 10 |
|
|
@@ -14,7 +13,7 @@ def fetch_articles_newsapi(topic):
|
|
| 14 |
"""
|
| 15 |
url = 'https://newsapi.org/v2/everything'
|
| 16 |
params = {
|
| 17 |
-
'apiKey':
|
| 18 |
'language': 'en',
|
| 19 |
'q': topic,
|
| 20 |
'pageSize': 20
|
|
|
|
| 4 |
# News Source Integration
|
| 5 |
# This script integrates with various news sources to fetch the latest articles from the specified news sources, extracts relevant information such as title, URL,Source,Author and Publish date.
|
| 6 |
|
|
|
|
| 7 |
import requests
|
| 8 |
import feedparser
|
| 9 |
|
|
|
|
| 13 |
"""
|
| 14 |
url = 'https://newsapi.org/v2/everything'
|
| 15 |
params = {
|
| 16 |
+
'apiKey': api_key,
|
| 17 |
'language': 'en',
|
| 18 |
'q': topic,
|
| 19 |
'pageSize': 20
|