mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-06 04:53:01 +02:00
Added currency symbol for RUB
This commit is contained in:
parent
8dddfb9c05
commit
bf6f617800
1 changed files with 2 additions and 2 deletions
|
|
@ -85,7 +85,7 @@ def create_search_result(self, data):
|
|||
|
||||
sRes = SearchResult()
|
||||
sRes.drm = SearchResult.DRM_UNLOCKED
|
||||
sRes.detail_item = data.xpath(xp_template.format('hub_id'))
|
||||
sRes.detail_item = data.xpath(xp_template.format('hub_id'))
|
||||
sRes.title = data.xpath('string(.//title-info/book-title/text()|.//publish-info/book-name/text())')
|
||||
# aut = concat('.//title-info/author/first-name', ' ')
|
||||
authors = data.xpath('.//title-info/author/first-name/text()|'
|
||||
|
|
@ -112,7 +112,7 @@ def format_price_in_RUR(price):
|
|||
'''
|
||||
if price and re.match(r"^\d*?\.\d*?$", price):
|
||||
try:
|
||||
price = u'{:,.2F} руб.'.format(float(price))
|
||||
price = u'{:,.2F} \u20BD'.format(float(price)) # \u20BD => руб.
|
||||
price = price.replace(',', ' ').replace('.', ',', 1)
|
||||
except:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in a new issue