diff --git a/scraper/src/strategies/abstract_strategy.py b/scraper/src/strategies/abstract_strategy.py index 4645c28..2cff2a3 100644 --- a/scraper/src/strategies/abstract_strategy.py +++ b/scraper/src/strategies/abstract_strategy.py @@ -39,9 +39,8 @@ def get_dom(response): try: body = response.body.decode(response.encoding) result = lxml.html.fromstring(body) - except (UnicodeError, ValueError): + except (UnicodeError, ValueError, lxml.etree.ParserError): result = lxml.html.fromstring(response.body) - return result def get_strip_chars(self, level, selectors):