mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Ozon.ru metadata download plugin for website changes. Fixes #1407265 [ozon metadata parsing error](https://bugs.launchpad.net/calibre/+bug/1407265)
This commit is contained in:
parent
565317040b
commit
40908a4c18
@ -147,7 +147,7 @@ class Ozon(Source):
|
||||
norm_authors = map(_normalizeAuthorNameWithInitials, map(unicode.strip, unicode(author).split(u',')))
|
||||
mi = Metadata(title, norm_authors)
|
||||
|
||||
ozon_id = entry.xpath(u'substring-before(substring-after(normalize-space(.//a[starts-with(@href, "/context/detail/id/")][1]/@href), "id/"), "/")')
|
||||
ozon_id = entry.xpath(u'substring-before(substring-after(normalize-space(//link[@rel="canonical"][contains(@href, "/context/detail/id/")][1]/@href), "id/"), "/")')
|
||||
if ozon_id:
|
||||
# log.debug(u'ozon_id (from_detail): -----> %s' % ozon_id)
|
||||
mi.identifiers = {'ozon':ozon_id}
|
||||
|
Loading…
x
Reference in New Issue
Block a user