From bff49cd2b936a7bea6b65436415ebef550c093ce Mon Sep 17 00:00:00 2001 From: hotyue <52734432+hotyue@users.noreply.github.com> Date: Mon, 27 Apr 2026 10:38:00 +0000 Subject: [PATCH] =?UTF-8?q?feat(data):=20=E6=96=B0=E5=A2=9E=E9=9D=9E?= =?UTF-8?q?=E6=B4=B2=E6=88=98=E5=8C=BA=20-=20=E5=B0=BC=E6=97=A5=E5=88=A9?= =?UTF-8?q?=E4=BA=9A=20(Nigeria,=20NG)=20=E8=8A=82=E7=82=B9=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20(closes=20#38)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/keywords/kw_NG.txt | 10 +++++++++ data/map.json | 23 ++++++++++++++++++++ data/regions/NG/Default/Lagos.json | 35 ++++++++++++++++++++++++++++++ scripts/fetch_trust_urls.py | 3 ++- 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 data/keywords/kw_NG.txt create mode 100644 data/regions/NG/Default/Lagos.json diff --git a/data/keywords/kw_NG.txt b/data/keywords/kw_NG.txt new file mode 100644 index 0000000..6c12fdd --- /dev/null +++ b/data/keywords/kw_NG.txt @@ -0,0 +1,10 @@ +tinubu +lagos weather +nigeria news +super eagles +naira exchange rate +davido +wizkid +burna boy +afcon +nollywood \ No newline at end of file diff --git a/data/map.json b/data/map.json index 0c23074..a16e2e5 100644 --- a/data/map.json +++ b/data/map.json @@ -402,6 +402,29 @@ ] } ] + }, + { + "id": "AFRICA", + "name": "非洲战区 (Africa)", + "countries": [ + { + "id": "NG", + "name": "Nigeria (尼日利亚)", + "keyword_file": "kw_NG.txt", + "states": [ + { + "id": "Default", + "name": "Default State", + "cities": [ + { + "id": "Lagos", + "name": "Lagos (拉各斯)" + } + ] + } + ] + } + ] } ] } \ No newline at end of file diff --git a/data/regions/NG/Default/Lagos.json b/data/regions/NG/Default/Lagos.json new file mode 100644 index 0000000..fb14556 --- /dev/null +++ b/data/regions/NG/Default/Lagos.json @@ -0,0 +1,35 @@ +{ + "region_name": "Nigeria - Lagos", + "google_module": { + "base_lat": 6.5244, + "base_lon": 3.3792, + "lang_params": "hl=en-NG&gl=NG", + "valid_url_suffix": "com.ng" + }, + "trust_module": { + "white_urls": [ + "https://www.jumia.com.ng/", + "https://www.punchng.com/", + "https://www.gtbank.com/", + "https://guardian.ng/", + "https://www.konga.com/", + "https://www.firstbanknigeria.com/", + "https://www.vanguardngr.com/", + "https://www.nairaland.com/", + "https://www.airtel.com.ng/", + "https://www.mtn.ng/" + ], + "static_urls": [ + "https://www.jumia.com.ng/", + "https://www.punchng.com/", + "https://www.gtbank.com/", + "https://guardian.ng/", + "https://www.konga.com/", + "https://www.firstbanknigeria.com/", + "https://www.vanguardngr.com/", + "https://www.nairaland.com/", + "https://www.airtel.com.ng/", + "https://www.mtn.ng/" + ] + } +} \ No newline at end of file diff --git a/scripts/fetch_trust_urls.py b/scripts/fetch_trust_urls.py index 97a3f53..4a0caaa 100644 --- a/scripts/fetch_trust_urls.py +++ b/scripts/fetch_trust_urls.py @@ -30,7 +30,8 @@ RSS_FEEDS = { "SG": ["https://www.channelnewsasia.com/api/v1/rss-outbound-feed?_format=xml"], "NL": ["https://feeds.nos.nl/nosnieuwsalgemeen"], "VN": ["https://vnexpress.net/rss/tin-moi-nhat.rss"], - "MY": ["https://news.google.com/rss?hl=en-MY&gl=MY&ceid=MY:en"] + "MY": ["https://news.google.com/rss?hl=en-MY&gl=MY&ceid=MY:en"], + "NG": ["https://punchng.com/feed/", "https://guardian.ng/feed/"] } def fetch_rss_links(region_code, max_items=15):