diff --git a/olxparser/parser.py b/olxparser/parser.py index 30fa2d1..1be08da 100644 --- a/olxparser/parser.py +++ b/olxparser/parser.py @@ -148,7 +148,7 @@ def get_header(soup: BeautifulSoup) -> [str, str]: header = soup.find("h4", class_="css-1kc83jo") if not header: - return None + return "Заголовок не знайдено. Повідомте розробника про помилку." return header.text @@ -157,7 +157,7 @@ def get_caption(soup: BeautifulSoup) -> str: caption = soup.find("div", class_="css-1t507yq") if not caption: - return "Описание не найдено" + return "Опис не знайдено. Повідомте розробника про помилку." if len(caption.text) > 800: return caption.text[0:800]