You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/usr/local/lib/python3.7/site-packages/scrapy/utils/defer.py", line 150, in f
return deferred_from_coro(coro_f(*coro_args, **coro_kwargs))
File "/code/newsbot/pipelines.py", line 46, in process_item
item = self._process_metrics(spider, item, self._metrics)
File "/code/newsbot/pipelines.py", line 79, in _process_metrics
item[m] = spider.process_metric(item.get(m, ["0"]))
File "/code/newsbot/spiders/news.py", line 115, in process_metric
return metrics[0]
IndexError: list index out of range
The text was updated successfully, but these errors were encountered:
Ошибка возникает из-за некорректоного xpath для поля comm_count (судя по всем количество комментариев). Это единственный паук у которого он задан, в других пауках просто стоит прочерк '-'.
Я сейчас проверил, просто убрав путь и сделав прочерк как у других, ошибки нет. @iggisv9t Если такой вариант решения проблемы подойдет, то закомичу.
при сборе kommersant возникает исключение:
The text was updated successfully, but these errors were encountered: