View Single Post
Old 06-28-2019, 02:40 PM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by Ubiquity View Post
I wouldnot say that my artist string is in list form. Fetching it and joining to reult string which initializes Metadata structure

Code:
authors = root.xpath('//h2[@class="authornames"]/span/a/text()')
if authors:
  authors = ' & '.join(authors).strip()
.
.
.
mi = Metadata(title, authors)
So that is exactly the problem. DO NOT JOIN THEM. Metadata() requires that you *not* join them yourself using ' & '.join(), so... you have explicitly converted your isinstance(authors, list) from a form that is useful and good, to a form that is useless and bad.

Quote:
Originally Posted by Ubiquity View Post
My issue seem to relate with unknown codepage in which Calibre operates the plugin.

If I parse the detail page in testing standalone script, all acuted string literals print out in proper form. If I print same string constants from plugin source, they print out in broken form, representing higher ascii characters in two byte unreadable chunks. But both plugin sources and testing script are saved in UTF-8 encoding.
You posted about multiple unrelated issues. I didn't say anything about this issue.
eschwartz is offline   Reply With Quote