From 9863d91921e3416123ad88970400a395a924f824 Mon Sep 17 00:00:00 2001 From: detker <127975811+detker@users.noreply.github.com> Date: Thu, 7 Dec 2023 12:00:10 +0100 Subject: [PATCH] Update fin.py --- otodom/task_1/wk/fin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/otodom/task_1/wk/fin.py b/otodom/task_1/wk/fin.py index c43e968..3a02dda 100644 --- a/otodom/task_1/wk/fin.py +++ b/otodom/task_1/wk/fin.py @@ -53,7 +53,7 @@ def scrape_single_record(record): float( record.find("span", title=None, string=regex) .string[:-3] - .replace(u"\xa0", u"") + .replace("\xa0", "") .replace(",", ".") ) ) @@ -110,5 +110,6 @@ def scrape_single_record(record): print("Scrapping completed : ~ D") with open("db.json", "w", encoding="utf-8") as file: json.dump(scrapped_data, file, ensure_ascii=False, indent=4) + file.write("\n") print("Scapped data saved in db.json")