Spaces:
Running
Running
Commit ·
3c9e07f
1
Parent(s): c10d739
Replace World Health feeds: STAT, ScienceDaily, Science News, Medscape, NIH, Harvard Gazette
Browse files- config.py +5 -2
- src/analyzer.py +10 -0
- src/rss_feed_scraper.py +5 -2
config.py
CHANGED
|
@@ -20,10 +20,13 @@ class Config:
|
|
| 20 |
"https://www.aljazeera.com/xml/rss/all.xml",
|
| 21 |
"https://www.theguardian.com/world/rss",
|
| 22 |
# ---- World Health ----
|
| 23 |
-
"https://feeds.bbci.co.uk/news/health/rss.xml",
|
| 24 |
-
"https://rss.nytimes.com/services/xml/rss/nyt/Science.xml",
|
| 25 |
"https://www.statnews.com/feed/",
|
| 26 |
"https://www.sciencedaily.com/rss/all.xml",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
# ---- Tech ----
|
| 28 |
"https://feeds.bbci.co.uk/news/technology/rss.xml",
|
| 29 |
"https://rss.nytimes.com/services/xml/rss/nyt/Technology.xml",
|
|
|
|
| 20 |
"https://www.aljazeera.com/xml/rss/all.xml",
|
| 21 |
"https://www.theguardian.com/world/rss",
|
| 22 |
# ---- World Health ----
|
|
|
|
|
|
|
| 23 |
"https://www.statnews.com/feed/",
|
| 24 |
"https://www.sciencedaily.com/rss/all.xml",
|
| 25 |
+
"https://www.sciencenews.org/feed",
|
| 26 |
+
"https://www.medscape.com/cx/rssfeeds/2700.xml",
|
| 27 |
+
"https://www.nih.gov/news-events/news-releases/rss.xml",
|
| 28 |
+
"https://news.harvard.edu/gazette/feed/",
|
| 29 |
+
"https://news.harvard.edu/gazette/section/health-medicine/feed/",
|
| 30 |
# ---- Tech ----
|
| 31 |
"https://feeds.bbci.co.uk/news/technology/rss.xml",
|
| 32 |
"https://rss.nytimes.com/services/xml/rss/nyt/Technology.xml",
|
src/analyzer.py
CHANGED
|
@@ -13,6 +13,8 @@ RELIABLE_DOMAINS = {
|
|
| 13 |
"economist.com": 0.15, "nature.com": 0.20, "science.org": 0.18,
|
| 14 |
"sciencedaily.com": 0.14, "theguardian.com": 0.08, "nytimes.com": 0.10,
|
| 15 |
"washingtonpost.com": 0.10, "ft.com": 0.14, "bloomberg.com": 0.12,
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
UNRELIABLE_DOMAINS = {
|
|
@@ -73,6 +75,10 @@ SPONSOR_INFO: dict[str, dict] = {
|
|
| 73 |
"thedailymash.co.uk": {"display": "Daily Mash", "parent": "Independent", "category": "independent", "bias": "satire", "factuality": "satire", "owners": ["Neil Rafferty (founder)"], "wikipedia": "https://en.wikipedia.org/wiki/The_Daily_Mash"},
|
| 74 |
"babylonbee.com": {"display": "Babylon Bee", "parent": "Independent", "category": "independent", "bias": "satire", "factuality": "satire", "owners": ["Seth Dillon (CEO)"], "wikipedia": "https://en.wikipedia.org/wiki/Babylon_Bee"},
|
| 75 |
"sciencedaily.com": {"display": "ScienceDaily", "parent": "ScienceDaily LLC", "category": "independent", "bias": "center", "factuality": "high", "owners": ["Dan Hogan (founder)"], "wikipedia": "https://en.wikipedia.org/wiki/ScienceDaily"},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
"middleeasteye.net": {"display": "Middle East Eye", "parent": "Independent", "category": "independent", "bias": "left-center", "factuality": "mixed", "owners": ["Independent (London-based, reader-supported)"], "wikipedia": "https://en.wikipedia.org/wiki/Middle_East_Eye"},
|
| 77 |
"newarab.com": {"display": "The New Arab", "parent": "Fikra Publishing", "category": "independent", "bias": "left-center", "factuality": "mixed", "owners": ["Fikra Publishing Ltd."], "wikipedia": "https://en.wikipedia.org/wiki/The_New_Arab"},
|
| 78 |
"tunisiaonlinenews.com": {"display": "Tunisia Online News", "parent": "Independent", "category": "independent", "bias": "center", "factuality": "mixed", "owners": ["Independent editorial team"], "wikipedia": ""},
|
|
@@ -470,6 +476,10 @@ class NewsAnalyzer:
|
|
| 470 |
"deadline.com": "movies",
|
| 471 |
"screenrant.com": "movies",
|
| 472 |
"tunisiaonlinenews.com": "tunisia",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 473 |
}
|
| 474 |
|
| 475 |
def _keyword_topic_match(self, article: Article, summary: str) -> list[str]:
|
|
|
|
| 13 |
"economist.com": 0.15, "nature.com": 0.20, "science.org": 0.18,
|
| 14 |
"sciencedaily.com": 0.14, "theguardian.com": 0.08, "nytimes.com": 0.10,
|
| 15 |
"washingtonpost.com": 0.10, "ft.com": 0.14, "bloomberg.com": 0.12,
|
| 16 |
+
"sciencenews.org": 0.14, "medscape.com": 0.12, "nih.gov": 0.16,
|
| 17 |
+
"news.harvard.edu": 0.14,
|
| 18 |
}
|
| 19 |
|
| 20 |
UNRELIABLE_DOMAINS = {
|
|
|
|
| 75 |
"thedailymash.co.uk": {"display": "Daily Mash", "parent": "Independent", "category": "independent", "bias": "satire", "factuality": "satire", "owners": ["Neil Rafferty (founder)"], "wikipedia": "https://en.wikipedia.org/wiki/The_Daily_Mash"},
|
| 76 |
"babylonbee.com": {"display": "Babylon Bee", "parent": "Independent", "category": "independent", "bias": "satire", "factuality": "satire", "owners": ["Seth Dillon (CEO)"], "wikipedia": "https://en.wikipedia.org/wiki/Babylon_Bee"},
|
| 77 |
"sciencedaily.com": {"display": "ScienceDaily", "parent": "ScienceDaily LLC", "category": "independent", "bias": "center", "factuality": "high", "owners": ["Dan Hogan (founder)"], "wikipedia": "https://en.wikipedia.org/wiki/ScienceDaily"},
|
| 78 |
+
"sciencenews.org": {"display": "Science News", "parent": "Society for Science", "category": "independent", "bias": "center", "factuality": "high", "owners": ["Society for Science (non-profit)"], "wikipedia": "https://en.wikipedia.org/wiki/Science_News"},
|
| 79 |
+
"medscape.com": {"display": "Medscape", "parent": "WebMD Health Corp", "category": "corporate", "bias": "center", "factuality": "high", "owners": ["Internet Brands (KKR & Co.)"], "wikipedia": "https://en.wikipedia.org/wiki/Medscape"},
|
| 80 |
+
"nih.gov": {"display": "National Institutes of Health", "parent": "U.S. Department of Health and Human Services", "category": "government", "bias": "center", "factuality": "high", "owners": ["U.S. Federal Government"], "wikipedia": "https://en.wikipedia.org/wiki/National_Institutes_of_Health"},
|
| 81 |
+
"news.harvard.edu": {"display": "Harvard Gazette", "parent": "Harvard University", "category": "independent", "bias": "center", "factuality": "high", "owners": ["Harvard University (non-profit educational institution)"], "wikipedia": "https://en.wikipedia.org/wiki/Harvard_Gazette"},
|
| 82 |
"middleeasteye.net": {"display": "Middle East Eye", "parent": "Independent", "category": "independent", "bias": "left-center", "factuality": "mixed", "owners": ["Independent (London-based, reader-supported)"], "wikipedia": "https://en.wikipedia.org/wiki/Middle_East_Eye"},
|
| 83 |
"newarab.com": {"display": "The New Arab", "parent": "Fikra Publishing", "category": "independent", "bias": "left-center", "factuality": "mixed", "owners": ["Fikra Publishing Ltd."], "wikipedia": "https://en.wikipedia.org/wiki/The_New_Arab"},
|
| 84 |
"tunisiaonlinenews.com": {"display": "Tunisia Online News", "parent": "Independent", "category": "independent", "bias": "center", "factuality": "mixed", "owners": ["Independent editorial team"], "wikipedia": ""},
|
|
|
|
| 476 |
"deadline.com": "movies",
|
| 477 |
"screenrant.com": "movies",
|
| 478 |
"tunisiaonlinenews.com": "tunisia",
|
| 479 |
+
"sciencenews.org": "health",
|
| 480 |
+
"medscape.com": "health",
|
| 481 |
+
"nih.gov": "health",
|
| 482 |
+
"news.harvard.edu": "health",
|
| 483 |
}
|
| 484 |
|
| 485 |
def _keyword_topic_match(self, article: Article, summary: str) -> list[str]:
|
src/rss_feed_scraper.py
CHANGED
|
@@ -21,10 +21,13 @@ DEFAULT_FEEDS = [
|
|
| 21 |
"https://www.aljazeera.com/xml/rss/all.xml",
|
| 22 |
"https://www.theguardian.com/world/rss",
|
| 23 |
# World Health
|
| 24 |
-
"https://feeds.bbci.co.uk/news/health/rss.xml",
|
| 25 |
-
"https://rss.nytimes.com/services/xml/rss/nyt/Science.xml",
|
| 26 |
"https://www.statnews.com/feed/",
|
| 27 |
"https://www.sciencedaily.com/rss/all.xml",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
# Tech
|
| 29 |
"https://feeds.bbci.co.uk/news/technology/rss.xml",
|
| 30 |
"https://rss.nytimes.com/services/xml/rss/nyt/Technology.xml",
|
|
|
|
| 21 |
"https://www.aljazeera.com/xml/rss/all.xml",
|
| 22 |
"https://www.theguardian.com/world/rss",
|
| 23 |
# World Health
|
|
|
|
|
|
|
| 24 |
"https://www.statnews.com/feed/",
|
| 25 |
"https://www.sciencedaily.com/rss/all.xml",
|
| 26 |
+
"https://www.sciencenews.org/feed",
|
| 27 |
+
"https://www.medscape.com/cx/rssfeeds/2700.xml",
|
| 28 |
+
"https://www.nih.gov/news-events/news-releases/rss.xml",
|
| 29 |
+
"https://news.harvard.edu/gazette/feed/",
|
| 30 |
+
"https://news.harvard.edu/gazette/section/health-medicine/feed/",
|
| 31 |
# Tech
|
| 32 |
"https://feeds.bbci.co.uk/news/technology/rss.xml",
|
| 33 |
"https://rss.nytimes.com/services/xml/rss/nyt/Technology.xml",
|