View Single Post
Old 07-01-2021, 03:23 PM   #32
tastytea
Junior Member
tastytea has learned how to buy an e-book online
 
tastytea's Avatar
 
Posts: 4
Karma: 80
Join Date: Mar 2021
Device: PocketBook Touch HD 3
Hi, thanks for your plugin!
I have a book that records page numbers like this:
Code:
<span role="doc-pagebreak" id="pg_13" aria-label="13">
Changing PageList.json to:
Code:
{
  "tag": "span",
  "attribute": "role",
  "value": "doc-pagebreak"
}
did not suffice, I also had to change plugin.py like this:
Code:
diff --git a/plugin.py b/plugin.py
index 9bf6b68..26a6863 100644
--- a/plugin.py
+++ b/plugin.py
@@ -143,6 +143,8 @@ def run(bk):
             # title has priority over string
             if page_number.has_attr('title'):
                 title = page_number['title']
+            elif page_number.has_attr('aria-label'):
+                title = page_number['aria-label']
             else:
                 title = page_number.string
Could you add that to your plugin?
tastytea is offline   Reply With Quote