Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions data/all.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Aktualisierte Sanktionsmeldung: Taliban | Thu, 12 Mar 2026 14:28:55 +0100 | https://www.finma.ch/en/news/2026/03/20260312-sr-946-231-07/
Aktualisierte Sanktionsmeldung: Islamische Republik Iran | Tue, 10 Mar 2026 16:28:45 +0100 | https://www.finma.ch/en/news/2026/03/20260310-sr-946-231-143-6/
Aktualisierte Sanktionsmeldung: ISIL (Da'esh) / Al-Kaida | Tue, 03 Mar 2026 16:17:52 +0100 | https://www.finma.ch/en/news/2026/03/20260303-sr-946-231-08/
FINMA proceedings: MBaer Merchant Bank AG in liquidation | Fri, 27 Feb 2026 15:00:00 +0100 | https://www.finma.ch/en/news/2026/02/20260227-mm-mbaer-liquidation/
Measures at MBaer Merchant Bank AG | Thu, 26 Feb 2026 15:30:00 +0100 | https://www.finma.ch/en/news/2026/02/20260226-mm-mbaer/
Sanktionen: Russland und Belarus | Thu, 26 Feb 2026 14:47:26 +0100 | https://www.finma.ch/en/news/2026/02/20260226-sanktionsmeldung-russland-belarus/
Aktualisierte Sanktionsmeldung: Sudan | Thu, 26 Feb 2026 14:41:17 +0100 | https://www.finma.ch/en/news/2026/02/20260226-sr-946-231-18/
Aktualisierte Sanktionsmeldung: Russland | Wed, 25 Feb 2026 14:24:33 +0100 | https://www.finma.ch/en/news/2026/02/20260225_sr-946-231-176-72/
Aktualisierte Sanktionsmeldung: Sudan | Thu, 19 Feb 2026 08:22:44 +0100 | https://www.finma.ch/en/news/2026/02/20260219_sr-946-231-18/
Aktualisierte Sanktionsmeldung | Thu, 19 Feb 2026 08:17:08 +0100 | https://www.finma.ch/en/news/2026/02/20260219_sr-946-231-09/
Alain Girard to assume leadership of FINMA’s Banks division | Wed, 18 Feb 2026 09:59:00 +0100 | https://www.finma.ch/en/news/2026/02/20260218-mm-leitung-gb-b/
FINMA to relocate its Zurich office from the city centre to Oerlikon | Fri, 06 Feb 2026 11:00:00 +0100 | https://www.finma.ch/en/news/2026/02/20260206-meldung-standort-zh/
Aktualisierte Sanktionsmeldung: Russland | Fri, 30 Jan 2026 15:58:54 +0100 | https://www.finma.ch/en/news/2026/01/20260130-sr-946-231-176-72/
Aktualisierte Sanktionsmeldung: Haiti | Thu, 29 Jan 2026 08:28:55 +0100 | https://www.finma.ch/en/news/2026/01/20260129-sr-946-231-139-4/
Aktualisierte Sanktionsmeldung: Guatemala | Tue, 27 Jan 2026 13:21:43 +0100 | https://www.finma.ch/en/news/2026/01/20260127-sr-946-231-137-6/
Aktualisierte Sanktionsmeldung: Demokratische Republik Kongo | Tue, 13 Jan 2026 12:13:38 +0100 | https://www.finma.ch/en/news/2026/01/20260113-sr-946-231-12/
Aktualisierte Sanktionsmeldung: Venezuela | Tue, 13 Jan 2026 12:09:30 +0100 | https://www.finma.ch/en/news/2026/01/20260113-sr-946-231-178-5/
Aktualisierte Sanktionsmeldung: Russland | Tue, 13 Jan 2026 12:03:42 +0100 | https://www.finma.ch/en/news/2026/01/20260113-sr-946-231-176-72/
FINMA publishes guidance on risks associated with the custody of cryptobased assets | Mon, 12 Jan 2026 09:59:00 +0100 | https://www.finma.ch/en/news/2026/01/20260112-mm-am-01-26/
New ordinance on the freezing of assets in the context of Venezuela of 5 January 2026 | Mon, 05 Jan 2026 13:45:00 +0100 | https://www.finma.ch/en/news/2026/01/20260105-sr-196-127-85/
FINMA launches consultation on partially revised Circular 2016/7 “Video and online identification” | Tue, 16 Dec 2025 09:59:00 +0100 | https://www.finma.ch/en/news/2025/12/20251216-mm-video-online-id/
Totalrevision der Verordnung über Massnahmen gegenüber der Islamischen Republik Iran | Mon, 15 Dec 2025 10:32:39 +0100 | https://www.finma.ch/en/news/2025/12/20251215-sr-946-231-143-6/
Sanktionen: Die Schweiz weitet ihre Sanktionslisten betreffend Russland und Belarus aus | Fri, 12 Dec 2025 16:39:27 +0100 | https://www.finma.ch/en/news/2025/12/20251212-sanktionsmeldung-russland-belarus/
Aktualisierte Sanktionsmeldung: Republik Irak | Thu, 11 Dec 2025 09:04:35 +0100 | https://www.finma.ch/en/news/2025/12/20251211-sr-946-206/
Aktualisierte Sanktionsmeldung: Sudan | Tue, 09 Dec 2025 13:24:29 +0100 | https://www.finma.ch/en/news/2025/12/20251209-sr-946-231-18/
Hedwig Ulmer Busenhart joins FINMA’s Executive Board | Tue, 09 Dec 2025 09:00:00 +0100 | https://www.finma.ch/en/news/2025/12/20251209-mm-leitung-gb-v/
Swiss Takeover Board: Beat Fellmann’s term of office extended by one year | Fri, 28 Nov 2025 09:58:00 +0100 | https://www.finma.ch/en/news/2025/11/20251128-mm-uek-verlaengerung/
Ex-post evaluation of Circular 2019/2 “Interest rate risks – banks” | Wed, 26 Nov 2025 09:58:00 +0100 | https://www.finma.ch/en/news/2025/11/20251126-mm-expost-rs-19-2-zinsrisiken/
Federal Council appoints new member to FINMA’s Board of Directors | Wed, 19 Nov 2025 06:58:10 +0100 | https://www.finma.ch/en/news/2025/11/20251119-mm-change-vr/
FINMA Risk Monitor 2025: accentuated geopolitical risks – cyber and real estate risks continue to grow | Mon, 17 Nov 2025 09:00:00 +0100 | https://www.finma.ch/en/news/2025/11/20251117-mm-risikomonitor/
Insurance intermediary certificates unlawfully obtained due to manipulation | Tue, 11 Nov 2025 08:59:00 +0100 | https://www.finma.ch/en/news/2025/11/20251111-mm-vbv/
Aktualisierte Sanktionsmeldung: ISIL (Da'esh) / Al-Kaida | Fri, 07 Nov 2025 16:05:45 +0100 | https://www.finma.ch/en/news/2025/11/20251107-sr-946-231-08/
Aktualisierte Sanktionsmeldung: Belarus | Fri, 31 Oct 2025 08:42:14 +0100 | https://www.finma.ch/en/news/2025/10/20251031-sr-946-231-116-9/
Aktualisierte Sanktionsmeldung: Russland | Thu, 30 Oct 2025 14:03:08 +0100 | https://www.finma.ch/en/news/2025/10/20251030-sr-946-231-176-72/
Aktualisierte Sanktionsmeldung: ISIL (Da'esh) / Al-Kaida | Wed, 22 Oct 2025 15:44:04 +0200 | https://www.finma.ch/en/news/2025/10/20251022-sr-946-231-08/
Aktualisierte Sanktionsmeldung: Haiti | Tue, 21 Oct 2025 17:28:13 +0200 | https://www.finma.ch/en/news/2025/10/20251021-sr-946-231-139-4/
Aktualisierte Sanktionsmeldung: Nicaragua | Tue, 21 Oct 2025 15:09:42 +0200 | https://www.finma.ch/en/news/2025/10/20251021-sr-946-231-158-5/
Aktualisierte Sanktionsmeldung: Islamischen Republik Iran | Tue, 21 Oct 2025 15:02:15 +0200 | https://www.finma.ch/en/news/2025/10/20251021-sr-946-231-143-6/
Aktualisierte Sanktionsmeldung: ISIL (Da'esh) / Al-Kaida | Fri, 17 Oct 2025 14:34:19 +0200 | https://www.finma.ch/en/news/2025/10/20251710-sr-946-231-08/
FINMA to appeal partial decision of the Federal Administrative Court concerning AT1 | Wed, 15 Oct 2025 09:59:00 +0200 | https://www.finma.ch/en/news/2025/10/20251015-meldung-bvger-at1/
Aktualisierte Sanktionsmeldung: ISIL (Da'esh) / Al-Kaida | Fri, 10 Oct 2025 12:08:58 +0200 | https://www.finma.ch/en/news/2025/10/20251010-sr-946-231-08/
FINMA publishes guidance on the extension of the transitional period for exchange of collateral in certain OTC derivatives transactions | Thu, 09 Oct 2025 09:55:00 +0200 | https://www.finma.ch/en/news/2025/10/20251009-meldung-am-04-25/
Aktualisierte Sanktionsmeldung: Burundi | Tue, 07 Oct 2025 14:16:00 +0200 | https://www.finma.ch/en/news/2025/10/20251007-sr-946-231-121-8/
Sanktionsmeldung: Guinea-Bissau | Tue, 07 Oct 2025 14:10:54 +0200 | https://www.finma.ch/en/news/2025/10/20251007-sr-946-231-138-3/
Aktualisierte Sanktionsmeldung: Syrien | Tue, 07 Oct 2025 14:04:54 +0200 | https://www.finma.ch/en/news/2025/10/20251007-rs-946-231-172-7/
Aktualisierte Sanktionsmeldung: Russland | Wed, 01 Oct 2025 06:11:24 +0200 | https://www.finma.ch/en/news/2025/10/20251001-sr-946-231-176-72/
UBS resolution report | Thu, 25 Sep 2025 08:00:00 +0200 | https://www.finma.ch/en/news/2025/09/20250925-mm-resolution-bericht-ubs/
FINMA and the UK supervisory authorities strengthen cooperation in financial services | Mon, 22 Sep 2025 12:14:00 +0200 | https://www.finma.ch/en/news/2025/09/20250922-meldung-mou-london/
FINMA publishes guidance on the disclosure of cryptobased assets in the annual financial statements of banks and securities firms | Fri, 05 Sep 2025 09:59:00 +0200 | https://www.finma.ch/en/news/2025/09/20250905-meldung-am-kryptovermoegenswerte/
FINMA publishes consolidated ordinance covering the insolvency proceedings at financial market institutions | Thu, 04 Sep 2025 09:58:00 +0200 | https://www.finma.ch/en/news/2025/09/20250904-mm-insolvenzverordnung/
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file added data/chroma/chroma.sqlite3
Binary file not shown.
Binary file removed data/input/BUA302_WEEK4_HW_IRIS.pdf
Binary file not shown.
17 changes: 12 additions & 5 deletions src/thomas/finma.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ class RssItem:
description: Optional[str]


def fetch_rss(url: str = RSS_URL, timeout: float = 20.0) -> bytes:
def fetch_rss(url: str = RSS_URL, timeout: float = 30.0) -> bytes:
# Create SSL context that doesn't verify certificates (for macOS certificate issues)
ssl_context = ssl.create_default_context()
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE

with urllib.request.urlopen(url, timeout=timeout, context=ssl_context) as resp:
with urllib.request.urlopen(
url, timeout=timeout, context=ssl_context
) as resp:
return resp.read()


Expand All @@ -46,7 +48,8 @@ def parse_rss(xml_bytes: bytes) -> List[RssItem]:
RssItem(
title=_text(item.find("title")),
link=_text(item.find("link")),
pubDate=_text(item.find("pubDate")) or _text(item.find("dc:date")),
pubDate=_text(item.find("pubDate"))
or _text(item.find("dc:date")),
description=_text(item.find("description")),
)
)
Expand Down Expand Up @@ -99,7 +102,9 @@ def _item_key(item: RssItem) -> str:
)
if concat:
return f"raw::{concat}"
return "json::" + json.dumps(asdict(item), sort_keys=True, ensure_ascii=False)
return "json::" + json.dumps(
asdict(item), sort_keys=True, ensure_ascii=False
)


def _load_existing_keys(path: Path) -> set[str]:
Expand Down Expand Up @@ -171,7 +176,9 @@ def main(argv: Optional[List[str]] = None) -> int:
help="Output file path (default: data/finma.txt)",
)
parser.add_argument(
"--url", default=RSS_URL, help="RSS URL to fetch (default: FINMA news RSS)"
"--url",
default=RSS_URL,
help="RSS URL to fetch (default: FINMA news RSS)",
)
args = parser.parse_args(argv)

Expand Down
Loading