diff --git a/leech.py b/leech.py index ee71ee4..cef6d37 100755 --- a/leech.py +++ b/leech.py @@ -111,10 +111,10 @@ def open_story(site, url, session, login, options): try: story = handler.extract(url) except sites.SiteException as e: - logger.error(e.args) + logger.error(e) return if not story: - raise Exception("Couldn't extract story") + logger.error("Couldn't extract story") return story diff --git a/sites/arbitrary.py b/sites/arbitrary.py index f3f9752..7b49f44 100644 --- a/sites/arbitrary.py +++ b/sites/arbitrary.py @@ -6,7 +6,7 @@ import datetime import json import re import os.path -from . import register, Site, Section, Chapter +from . import register, Site, Section, Chapter, SiteException logger = logging.getLogger(__name__) @@ -94,6 +94,9 @@ class Arbitrary(Site): else: content_url = False + if not story: + raise SiteException("No story content found; check the content selectors") + return story def _chapter(self, url, definition, title=False):