mirror of
https://github.com/vale981/kindle_fetch
synced 2025-03-04 08:31:38 -05:00
do not introduce extra spaces
This commit is contained in:
parent
538afac03e
commit
f1c8ea7586
1 changed files with 4 additions and 2 deletions
|
@ -45,7 +45,8 @@ class Options:
|
|||
def get_document_title(header_string):
|
||||
"""Get the title of the document from the email header."""
|
||||
m = re.search(
|
||||
r'"(.*?)" from your Kindle', header_string.replace("\n", " ").replace("\r", "")
|
||||
r'"(.*?)" from your ',
|
||||
header_string.replace("\n", " ").replace("\r", "").replace(" ", " "),
|
||||
)
|
||||
|
||||
if not m:
|
||||
|
@ -60,7 +61,8 @@ def get_download_link(text):
|
|||
just `page` pages from the email body.
|
||||
"""
|
||||
m = re.search(
|
||||
r"\[Download PDF\]\((.*?)\)", text.replace("\n", " ").replace("\r", "")
|
||||
r"\[Download PDF\]\((.*?)\)",
|
||||
text.replace("\n", " ").replace("\r", "").replace(" ", " "),
|
||||
)
|
||||
|
||||
if not m:
|
||||
|
|
Loading…
Add table
Reference in a new issue