Metadata Amazon no Series Numbers #1128
redskull1986
started this conversation in
Issue Triage
Replies: 2 comments
-
|
I've tested the second pattern with single digits and double digits. 3 of 3 It worked perfect on amazon.de. As I said, it should work with most languages. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I use this now for 2 months, and it worked perfect. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What went wrong?
How reportet in #1016 , amazon.de don't show series Numbers on.
I've looked into the code from AmazonBookParser.java and found the problem in the matching pattern. It only looks for english transcription.
private static final Pattern SERIES_FORMAT_PATTERN = Pattern.compile("Book (\\d+(?:\\.\\d+)?) of (\\d+)");A solution that work for english, german and france is:
private static final Pattern SERIES_FORMAT_PATTERN = Pattern.compile("(?:Buch|Book|Livre) (\\d+(?:\\.\\d+)?) (?:von|of|sur) (\\d+)");A solution that should work for the most languages:
private static final Pattern SERIES_FORMAT_PATTERN = Pattern.compile("(?:\\w+\\s)(\\d+(?:.\\d+)?).*?(?:\\w+\\s)(\\d+(?:.\\d+)?)");This pattern looks for
'word' 'whitespace' 'digit''(.digit)' 'any character' 'word' 'whitespace' 'digit'I've tested the first solution.
I could test the second solution today evening.
How can we reproduce it?
Fetch metadata from amazon.de, amazon.fr etc.
What Build of Grimmory are you on?
Stable
Your setup
Version 3.0.2 (2.9.x same bug)
Docker installation
Debian
Screenshots or error messages (optional)
No response
Before submitting
Beta Was this translation helpful? Give feedback.
All reactions