harao-ml commited on
Commit
24cf91c
·
verified ·
1 Parent(s): 7c3be27

Update gather_news.py

Browse files
Files changed (1) hide show
  1. 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': config.api_key,
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