[Bug] Missing API_KEY when getting book details.

This commit is contained in:
Li Fanxi 2011-05-28 02:09:41 +08:00
parent a62d9f3ab9
commit be10ae02fd

View File

@ -46,6 +46,8 @@ cover_url = XPath("descendant::atom:link[@rel='image']/attribute::href")
def get_details(browser, url, timeout): # {{{ def get_details(browser, url, timeout): # {{{
try: try:
if Douban.DOUBAN_API_KEY and Douban.DOUBAN_API_KEY != '':
url = url + "?apikey=" + Douban.DOUBAN_API_KEY
raw = browser.open_novisit(url, timeout=timeout).read() raw = browser.open_novisit(url, timeout=timeout).read()
except Exception as e: except Exception as e:
gc = getattr(e, 'getcode', lambda : -1) gc = getattr(e, 'getcode', lambda : -1)