From cc84a7857c120d4c1c1b150e7fb8676d30fb5957 Mon Sep 17 00:00:00 2001 From: Christian Krinitsin Date: Sun, 25 May 2025 19:24:43 +0200 Subject: refactor mailinglist script --- mailinglist/thread.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mailinglist/thread.py') diff --git a/mailinglist/thread.py b/mailinglist/thread.py index 8efd5a731..ae7da680d 100755 --- a/mailinglist/thread.py +++ b/mailinglist/thread.py @@ -5,13 +5,13 @@ from urllib.parse import urljoin from bs4 import BeautifulSoup -def write_message(html, hash_value): +def write_message(html : str, hash_value : str) -> None: soup = BeautifulSoup(html, 'html.parser') - text = soup.get_text(separator='\n', strip=True) + text = soup.get_text(separator = '\n', strip = True) with open(f"output_mailinglist/{hash_value}", "a") as file: file.write(f"{text}\n\n") -def process_thread(url, hash_value): +def process_thread(url : str, hash_value : str) -> None: request = get(url) text = request.text -- cgit 1.4.1