mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 23:13:27 +02:00
Get books: Fix amazon plugin for change to amazon results page markup
This commit is contained in:
parent
0167613cdb
commit
e0e20c7872
1 changed files with 2 additions and 1 deletions
|
|
@ -69,7 +69,7 @@ def asbytes(x):
|
|||
continue
|
||||
|
||||
cover_url = ''.join(result.xpath('.//img/@src'))
|
||||
title = etree.tostring(result.xpath('.//h5')[0], method='text', encoding='unicode')
|
||||
title = etree.tostring(result.xpath('.//h2')[0], method='text', encoding='unicode')
|
||||
adiv = result.xpath('.//div[contains(@class, "a-color-secondary")]')[0]
|
||||
aparts = etree.tostring(adiv, method='text', encoding='unicode').split()
|
||||
idx = aparts.index('|')
|
||||
|
|
@ -120,5 +120,6 @@ def get_details(self, search_result, timeout):
|
|||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
||||
for result in search_amazon(' '.join(sys.argv[1:]), write_html_to='/t/amazon.html'):
|
||||
print(result)
|
||||
|
|
|
|||
Loading…
Reference in a new issue