aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-07-25 23:57:23 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-25 23:57:23 +0200
commit01a6bc67e70600680a1bbf6b9b5d102192760ae4 (patch)
tree012786d1a68b0b67571a8f8e7fea93ce40caff55
parentc98e8b40452c21aed0b9db71b1c52f3476d67557 (diff)
Fix lhstranslation chapter name broken if name contains quotes
-rwxr-xr-xplugins/lhtranslation.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/lhtranslation.py b/plugins/lhtranslation.py
index f07a793..153f4ed 100755
--- a/plugins/lhtranslation.py
+++ b/plugins/lhtranslation.py
@@ -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.attrib.get("title").strip()
+ title = element.find("b").text.strip()
url = "https://lhtranslation.net/" + element.attrib.get("href").strip()
if title.lower().replace(" ", "") in seen_titles or url in seen_urls:
break