Skip to content

Commit 1655a5f

Browse files
committed
create-draft: Adapt to new PG link scheme
1 parent 281e4d6 commit 1655a5f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

se/executables_create_draft.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ def create_draft(args: list):
362362
# Get the ebook HTML URL from the metadata
363363
pg_ebook_url = None
364364
for element in soup.select("a[type^=\"text/html\"]"):
365-
pg_ebook_url = regex.sub("^//", "https://", element["href"])
365+
pg_ebook_url = regex.sub(r"^//", "https://", element["href"])
366+
pg_ebook_url = regex.sub(r"^/", "https://www.gutenberg.org/", pg_ebook_url)
366367

367368
if not pg_ebook_url:
368369
raise se.RemoteCommandErrorException("Could download ebook metadata, but couldn’t find URL for the ebook HTML.")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def _get_file_contents(file_path: Path) -> str:
2525
return file.read()
2626

2727
setup(
28-
version="1.0.22",
28+
version="1.0.23",
2929
name="standardebooks",
3030
description="The toolset used to produce Standard Ebooks epub ebooks.",
3131
long_description=_get_file_contents(Path(__file__).resolve().parent / "README.md"),

0 commit comments

Comments
 (0)