Store: Fix BeWrite plugin.

This commit is contained in:
John Schember 2011-08-27 16:10:28 -04:00
parent 9ab85b0710
commit e8be35ab44

View File

@ -80,10 +80,13 @@ class BeWriteStore(BasicStoreConfig, StorePlugin):
price = '$' + price.split('$')[-1] price = '$' + price.split('$')[-1]
search_result.price = price.strip() search_result.price = price.strip()
cover_img = idata.xpath('//div[@id="content"]//img[1]/@src') cover_img = idata.xpath('//div[@id="content"]//img/@src')
if cover_img: if cover_img:
cover_url = 'http://www.bewrite.net/mm5/' + cover_img[0] for i in cover_img:
if '00001' in i:
cover_url = 'http://www.bewrite.net/mm5/' + i
search_result.cover_url = cover_url.strip() search_result.cover_url = cover_url.strip()
break
formats = set([]) formats = set([])
if idata.xpath('boolean(//div[@id="content"]//td[contains(text(), "ePub")])'): if idata.xpath('boolean(//div[@id="content"]//td[contains(text(), "ePub")])'):