This commit is contained in:
Kovid Goyal 2013-08-21 10:30:05 +05:30
parent 8609f177f8
commit d61e0b5be8

View File

@ -138,7 +138,8 @@ class Ozon(Source):
for author in authors:
for miauthor in miauthors:
#log.debug(u'=> %s <> %s'%(author, miauthor))
if author in miauthor: return True
if author in miauthor:
return True
return None
def ensure_metadata_match(mi): # {{{
@ -338,7 +339,7 @@ class Ozon(Source):
metadata.pubdate = toPubdate(log, matcher.group(0))
# overwrite comments from HTML if any
xpt = u'//*[@id="detail_description"]//*[contains(text(), "От производителя")]/../node()[not(self::comment())][not(self::br)][preceding::*[contains(text(), "От производителя")]]'
xpt = u'//*[@id="detail_description"]//*[contains(text(), "От производителя")]/../node()[not(self::comment())][not(self::br)][preceding::*[contains(text(), "От производителя")]]' # noqa
from lxml.etree import ElementBase
comment_elem = doc.xpath(xpt)
if comment_elem:
@ -416,7 +417,6 @@ def _format_isbn(log, isbn): # {{{
$
""", re.VERBOSE)
res = check_isbn(isbn)
if res:
m = isbn_pat.match(res)
@ -480,7 +480,6 @@ if __name__ == '__main__': # tests {{{
from calibre.ebooks.metadata.sources.test import (test_identify_plugin,
title_test, authors_test, isbn_test)
test_identify_plugin(Ozon.name,
[
# (