aboutsummaryrefslogtreecommitdiff
path: root/plugins/lhtranslation.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/lhtranslation.py')
-rwxr-xr-xplugins/lhtranslation.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/lhtranslation.py b/plugins/lhtranslation.py
index 153f4ed..082b865 100755
--- a/plugins/lhtranslation.py
+++ b/plugins/lhtranslation.py
@@ -50,7 +50,7 @@ def list_chapters(url, chapter_list_input):
for item in chapter_list_input:
title = item.get("title")
if title and len(title) > 0:
- seen_titles.add(title.lower().replace(" ", ""))
+ seen_titles.add(title.lower().replace(" ", "").replace("/", "_"))
seen_urls = set()
for item in chapter_list_input:
@@ -61,7 +61,7 @@ def list_chapters(url, chapter_list_input):
tree = etree.HTML(response.text)
chapters = []
for element in tree.xpath("//div[@class='list-chapters']//a[@class='chapter']"):
- title = element.find("b").text.strip()
+ title = element.find("b").text.strip().replace("/", "_")
url = "https://lhtranslation.net/" + element.attrib.get("href").strip()
if title.lower().replace(" ", "") in seen_titles or url in seen_urls:
break