|
|
#1 |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,365
Karma: 79528341
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Custom identifier: User error?
Created this identifier:
Key: googleplay Name: Google Play Template: https://play.google.com/store/books/details?id={id} Pasting in https://play.google.com/store/books/details?id=AAAAAAA results in a URL identifier. Entering googleplay:AAAAAAA works and leads to the correct link (though in this example, that's an error page). Did I make a mistake, or is this a similar error to the resolved one with slashes? |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,618
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
This should fix it, though I havent tested it: https://github.com/kovidgoyal/calibr...5a01a5609ba2e9
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,365
Karma: 79528341
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
It works. Thank you.
|
|
|
|
|
|
#4 |
|
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,686
Karma: 7908443
Join Date: Sep 2020
Device: none
|
I can't see what the problem was, but I'm glad it's fixed, lol.
|
|
|
|
|
|
#5 |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,365
Karma: 79528341
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I think the ?id= was tripping it up due to the question mark:
Code:
vals = {'id' : '(?P<new_id>.+)'}
Last edited by ownedbycats; 01-18-2023 at 04:00 AM. Reason: typo |
|
|
|
| Advert | |
|
|
|
|
#6 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,618
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It used a regular expression based on the template. In OP's case the template contains a ? which is a special character in a regexp. So the fix is to escape all special characters in the template before converting it into a regex.
|
|
|
|
|
|
#7 | |
|
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,686
Karma: 7908443
Join Date: Sep 2020
Device: none
|
Quote:
I wasn't thinking templates. Since the clickable link on book details pane just works, this had me thinking what other use of the URL needed to be fixed |
|
|
|
|
|
|
#8 |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,365
Karma: 79528341
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I think it was just the 'paste URL' button using that bit of regex. Davidfor wrote that bit of code and he also forgot to account for slashes.
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Custom identifier: Is it possible to | ownedbycats | Library Management | 3 | 12-06-2022 10:12 AM |
| Regex for a custom identifier breaking links | ownedbycats | Library Management | 4 | 03-09-2021 01:29 AM |
| Identifier-like custom column | nqk | Library Management | 5 | 05-20-2017 02:38 AM |
| Error: Namespace prefix opf for scheme on identifier is not defined | uwe4711 | Conversion | 4 | 09-26-2013 01:44 PM |
| Classic User Made Custom Daily Content | DaveNB | Barnes & Noble NOOK | 9 | 12-14-2009 07:45 AM |