Skip to content

Commit 4c9514d

Browse files
alallemafatsabbats
authored andcommitted
Try to fix Scrapy ERROR: Spider error processing
1 parent d36dd0e commit 4c9514d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scraper/src/strategies/abstract_strategy.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ def get_dom(response):
3939
try:
4040
body = response.body.decode(response.encoding)
4141
result = lxml.html.fromstring(body)
42-
except (UnicodeError, ValueError):
42+
except (UnicodeError, ValueError, lxml.etree.ParserError):
4343
result = lxml.html.fromstring(response.body)
44-
4544
return result
4645

4746
def get_strip_chars(self, level, selectors):

0 commit comments

Comments
 (0)