Spaces:
Paused
Paused
Update news.py
Browse files
news.py
CHANGED
|
@@ -6,7 +6,7 @@ NEWSSS=""
|
|
| 6 |
def News(KEY,cache=True):
|
| 7 |
global NEWSSS
|
| 8 |
if NEWSSS:
|
| 9 |
-
return NEWSSS, None,
|
| 10 |
C = t()
|
| 11 |
main_url = f'https://newsapi.org/v2/top-headlines?sources=techcrunch&apiKey={KEY}'
|
| 12 |
main_page = requests.get(main_url).json()
|
|
|
|
| 6 |
def News(KEY,cache=True):
|
| 7 |
global NEWSSS
|
| 8 |
if NEWSSS:
|
| 9 |
+
return NEWSSS, None, 0
|
| 10 |
C = t()
|
| 11 |
main_url = f'https://newsapi.org/v2/top-headlines?sources=techcrunch&apiKey={KEY}'
|
| 12 |
main_page = requests.get(main_url).json()
|