mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
pep8
This commit is contained in:
parent
eb10773b6f
commit
ef3f0a8929
@ -7,7 +7,6 @@ __license__ = 'GPL 3'
|
|||||||
__copyright__ = '2011-2019, Tomasz Długosz <tomek3d@gmail.com>'
|
__copyright__ = '2011-2019, Tomasz Długosz <tomek3d@gmail.com>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import re
|
|
||||||
from base64 import b64encode
|
from base64 import b64encode
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
try:
|
try:
|
||||||
@ -78,7 +77,7 @@ class EmpikStore(BasicStoreConfig, StorePlugin):
|
|||||||
title = ''.join(data.xpath('.//div[@class="name"]/a/@title'))
|
title = ''.join(data.xpath('.//div[@class="name"]/a/@title'))
|
||||||
price = ''.join(data.xpath('.//div[@class="price ta-price-tile "]/text()'))
|
price = ''.join(data.xpath('.//div[@class="price ta-price-tile "]/text()'))
|
||||||
|
|
||||||
#with closing(br.open('https://empik.com' + id.strip(), timeout=timeout/4)) as nf:
|
# with closing(br.open('https://empik.com' + id.strip(), timeout=timeout/4)) as nf:
|
||||||
# idata = html.fromstring(nf.read())
|
# idata = html.fromstring(nf.read())
|
||||||
# crawled = idata.xpath('.//a[(@class="chosen hrefstyle") or (@class="connectionsLink hrefstyle")]/text()')
|
# crawled = idata.xpath('.//a[(@class="chosen hrefstyle") or (@class="connectionsLink hrefstyle")]/text()')
|
||||||
# formats = ','.join([re.sub('ebook, ','', x.strip()) for x in crawled if 'ebook' in x])
|
# formats = ','.join([re.sub('ebook, ','', x.strip()) for x in crawled if 'ebook' in x])
|
||||||
@ -91,6 +90,6 @@ class EmpikStore(BasicStoreConfig, StorePlugin):
|
|||||||
s.author = author.strip()
|
s.author = author.strip()
|
||||||
s.price = price.strip()
|
s.price = price.strip()
|
||||||
s.detail_item = 'https://empik.com' + id.strip()
|
s.detail_item = 'https://empik.com' + id.strip()
|
||||||
#s.formats = formats.upper().strip()
|
# s.formats = formats.upper().strip()
|
||||||
|
|
||||||
yield s
|
yield s
|
||||||
|
@ -7,7 +7,6 @@ __license__ = 'GPL 3'
|
|||||||
__copyright__ = '2011-2019, Tomasz Długosz <tomek3d@gmail.com>'
|
__copyright__ = '2011-2019, Tomasz Długosz <tomek3d@gmail.com>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import re
|
|
||||||
from base64 import b64encode
|
from base64 import b64encode
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user