detect legacy audience question blocks
This commit is contained in:
parent
5828d01ae6
commit
c030999181
1 changed files with 1 additions and 1 deletions
|
|
@ -163,7 +163,7 @@ def sanitize_rss_html(html: str) -> str:
|
||||||
def _is_audience_question_paragraph(paragraph_html: str) -> bool:
|
def _is_audience_question_paragraph(paragraph_html: str) -> bool:
|
||||||
text = re.sub(r"<[^>]+>", " ", paragraph_html, flags=re.S)
|
text = re.sub(r"<[^>]+>", " ", paragraph_html, flags=re.S)
|
||||||
text = re.sub(r"\s+", " ", unescape(text)).strip().lower()
|
text = re.sub(r"\s+", " ", unescape(text)).strip().lower()
|
||||||
return text.startswith("ваше мнение:") and "комментар" in text
|
return text.startswith("ваше мнение:")
|
||||||
|
|
||||||
|
|
||||||
def _audience_question_text(paragraph_html: str) -> str:
|
def _audience_question_text(paragraph_html: str) -> str:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue