Commit
•
a9f89a5
1
Parent(s):
b9ffefc
Update news_extractor/news_extractor.py
Browse files
news_extractor/news_extractor.py
CHANGED
@@ -43,7 +43,7 @@ def rss_parser(i):
|
|
43 |
desc = "" if b1.find("description") is None else b1.find("description").get_text()
|
44 |
desc = text_clean(desc)
|
45 |
desc = f'{desc[:300]}...' if len(desc) >= 300 else desc
|
46 |
-
date = "Sat, 12 Aug 2000 13:39:15 +0530" if ((b1.find("pubDate")
|
47 |
if url.find("businesstoday.in") >= 0:
|
48 |
date = date.replace("GMT", "+0530")
|
49 |
date1 = parser.parse(date)
|
|
|
43 |
desc = "" if b1.find("description") is None else b1.find("description").get_text()
|
44 |
desc = text_clean(desc)
|
45 |
desc = f'{desc[:300]}...' if len(desc) >= 300 else desc
|
46 |
+
date = "Sat, 12 Aug 2000 13:39:15 +0530" if ((b1.find("pubDate") == "") or (b1.find("pubDate") is None)) else b1.find("pubDate").get_text()
|
47 |
if url.find("businesstoday.in") >= 0:
|
48 |
date = date.replace("GMT", "+0530")
|
49 |
date1 = parser.parse(date)
|