ruff
This commit is contained in:
@@ -38,9 +38,14 @@ GMAIL_REQUEST_DELAY = 0.1
|
|||||||
HTML_BODY_TRUNCATE_LIMIT = 20000
|
HTML_BODY_TRUNCATE_LIMIT = 20000
|
||||||
|
|
||||||
GMAIL_METADATA_HEADERS = [
|
GMAIL_METADATA_HEADERS = [
|
||||||
"Subject", "From", "To", "Cc",
|
"Subject",
|
||||||
"Message-ID", "In-Reply-To", "References",
|
"From",
|
||||||
"Date"
|
"To",
|
||||||
|
"Cc",
|
||||||
|
"Message-ID",
|
||||||
|
"In-Reply-To",
|
||||||
|
"References",
|
||||||
|
"Date",
|
||||||
]
|
]
|
||||||
LOW_VALUE_TEXT_PLACEHOLDERS = (
|
LOW_VALUE_TEXT_PLACEHOLDERS = (
|
||||||
"your client does not support html",
|
"your client does not support html",
|
||||||
@@ -80,8 +85,6 @@ class _HTMLTextExtractor(HTMLParser):
|
|||||||
return " ".join("".join(self._text).split())
|
return " ".join("".join(self._text).split())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _html_to_text(html: str) -> str:
|
def _html_to_text(html: str) -> str:
|
||||||
"""Convert HTML to readable plain text."""
|
"""Convert HTML to readable plain text."""
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user