mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-06 02:43:46 +02:00
This commit is contained in:
parent
cd3da5d10e
commit
6a662a5854
1 changed files with 2 additions and 0 deletions
|
|
@ -306,6 +306,8 @@ def index_to_soup(self, url_or_raw):
|
|||
'''
|
||||
if re.match(r'\w+://', url_or_raw):
|
||||
raw = self.browser.open(url_or_raw).read()
|
||||
if not raw:
|
||||
raise RuntimeError('Could not fetch index from %s'%url_or_raw)
|
||||
else:
|
||||
raw = url_or_raw
|
||||
if not isinstance(raw, unicode) and self.encoding:
|
||||
|
|
|
|||
Loading…
Reference in a new issue