This commit is contained in:
Kovid Goyal 2010-10-27 07:55:47 -06:00
parent c7022e88eb
commit dbcbc5979d

View File

@ -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')))]