lalithadevi
commited on
Commit
•
14bfaaa
1
Parent(s):
e7c1655
Update news_extractor/news_extractor.py
Browse files
news_extractor/news_extractor.py
CHANGED
@@ -76,7 +76,7 @@ def news_agg(rss):
|
|
76 |
"""
|
77 |
try:
|
78 |
rss_df = pd.DataFrame()
|
79 |
-
resp = r.get(rss, timeout=
|
80 |
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " +
|
81 |
"(KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"})
|
82 |
b = BeautifulSoup(resp.content, "xml")
|
|
|
76 |
"""
|
77 |
try:
|
78 |
rss_df = pd.DataFrame()
|
79 |
+
resp = r.get(rss, timeout=2, headers={
|
80 |
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " +
|
81 |
"(KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"})
|
82 |
b = BeautifulSoup(resp.content, "xml")
|