File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
import requests
3
3
import json
4
+ import nltk
4
5
from dotenv import load_dotenv , find_dotenv
5
6
from newspaper import Article
6
- from newspaper import Config
7
7
from datetime import datetime
8
+ from newspaper import Config
8
9
from datetime import datetime
9
10
10
11
news_information = dict ()
16
17
17
18
18
19
def get_top_news (news_information , todays_date ):
19
- load_dotenv (find_dotenv (r"path to environmental variable" ))
20
+ load_dotenv (find_dotenv (r"path to env variable" ))
20
21
news_api_key = os .getenv ("news_api" )
21
22
params = (
22
23
('country' , 'us' ),
@@ -51,6 +52,3 @@ def json_file(news_information, todays_date):
51
52
with open (f"news_summary/news_summary { todays_date } .txt" , "w" ) as outfile :
52
53
outfile .write (json_file )
53
54
outfile .close ()
54
-
55
-
56
-
You can’t perform that action at this time.
0 commit comments