mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
...
This commit is contained in:
parent
c7022e88eb
commit
dbcbc5979d
@ -37,7 +37,6 @@ def get_social_metadata(title, authors, publisher, isbn):
|
|||||||
if isbn:
|
if isbn:
|
||||||
br = browser()
|
br = browser()
|
||||||
response_xml = br.open('http://status.calibre-ebook.com/aws/metadata/'+isbn).read()
|
response_xml = br.open('http://status.calibre-ebook.com/aws/metadata/'+isbn).read()
|
||||||
print 1111111, response_xml
|
|
||||||
root = etree.fromstring(response_xml)
|
root = etree.fromstring(response_xml)
|
||||||
try:
|
try:
|
||||||
check_for_errors(root, isbn)
|
check_for_errors(root, isbn)
|
||||||
@ -64,8 +63,6 @@ def get_social_metadata(title, authors, publisher, isbn):
|
|||||||
if num_of_reviews > 4 and rating > 0 and rating < 5:
|
if num_of_reviews > 4 and rating > 0 and rating < 5:
|
||||||
mi.rating = rating
|
mi.rating = rating
|
||||||
except:
|
except:
|
||||||
import traceback
|
|
||||||
traceback.print_exc()
|
|
||||||
pass
|
pass
|
||||||
tags = [x.text for x in root.findall('.//%s/%s'%(AWS('Subjects'),
|
tags = [x.text for x in root.findall('.//%s/%s'%(AWS('Subjects'),
|
||||||
AWS('Subject')))]
|
AWS('Subject')))]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user