feat: Remove html tags from original summary
This commit is contained in:
parent
c490f99e96
commit
3948b9060c
1 changed files with 4 additions and 1 deletions
|
|
@ -26,10 +26,13 @@ class Original: # BadJoke: Sting
|
|||
return (img, rest)
|
||||
return ("", s)
|
||||
|
||||
def _remove_html_tags(self, s: str) -> str:
|
||||
return re.sub(r"<.*?>", "", s)
|
||||
|
||||
def __post_init__(self):
|
||||
self.id = hashlib.sha256(self.link.encode()).hexdigest()
|
||||
|
||||
extracted = self._extract_img(self.summary)
|
||||
if extracted[0]:
|
||||
self.image_link = extracted[0]
|
||||
self.summary = extracted[1]
|
||||
self.summary = self._remove_html_tags(extracted[1])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue