Skip to content

Commit

Permalink
chabge parser
Browse files Browse the repository at this point in the history
  • Loading branch information
salko-ua committed Jul 7, 2024
1 parent 91c47e6 commit bdc4101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions olxparser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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]
Expand Down

0 comments on commit bdc4101

Please sign in to comment.