2014-04-24 3 views
0

은 내가 scrapy 프로젝트는 지금 막 완료, 나는 로그 말 발견 : 결과는 생각과 일치하지 않았기 때문에예외가 발생했을 때 자동 치료를 재 시도합니까?

INFO: Dumping Scrapy stats: 
    {'downloader/exception_count': 197, 
    'downloader/exception_type_count/twisted.web._newclient.ResponseFailed': 7, 
    'downloader/exception_type_count/twisted.web._newclient.ResponseNeverReceived': 190, 
    'downloader/request_bytes': 2765511, 
    'downloader/request_count': 8616, 
    'downloader/request_method_count/GET': 8616, 
    'downloader/response_bytes': 107541395, 
    'downloader/response_count': 8419, 
    'downloader/response_status_count/200': 8052, 
    'downloader/response_status_count/301': 144, 
    'downloader/response_status_count/302': 223, 
    'finish_reason': 'finished', 
    'finish_time': datetime.datetime(2014, 4, 24, 13, 35, 38, 955000), 
    'item_scraped_count': 7861, 
    'log_count/ERROR': 4, 
    'log_count/INFO': 7918, 
    'request_depth_max': 20, 
    'response_received_count': 8052, 
    'scheduler/dequeued': 8616, 
    'scheduler/dequeued/memory': 8616, 
    'scheduler/enqueued': 8616, 
    'scheduler/enqueued/memory': 8616, 
    'spider_exceptions/TypeError': 4, 
    'start_time': datetime.datetime(2014, 4, 24, 12, 45, 5, 812000)} 

나는 그게 ResponseFailedResponseNeverReceived 또는 다른 예외를 얻을 때 다시 시도 scrapy 않습니다 궁금해 . 크롤링 할 항목은 거의 3 만 개가되어야하지만 8616 만 크롤링합니다.이 프로젝트를 두 번째 실행 한 것입니다. 처음에는 7000 개의 항목 만 가져옵니다. 그리고 쿼리에 따라 총 9035 개의 고유 항목이 표시됩니다. 처음과 두 번 모두 다른 사람이 보지 못했던 일부 항목을 크롤링합니다. 왜 이런 일이 발생 했습니까?

답변

0

몇 시간 전까지 비슷한 문제가있었습니다. 것은 요청 개체의 기본 동작은 동일한 요청을 필터링하는 것입니다. 루프를 크롤링하지 않도록 사용은 당신이 진정한

이 설정으로 요청의 'dont_filter'인수를 설정하는 데 필요한 변경하려면,하지만 당신은 가로 크롤링에 있다면, (많은 URL을하지만, 상기 각 하나 표면 30K URL은 여기 dont_filter에 대한

찾는 문제가되지 않을한다)를 제안 같이

http://doc.scrapy.org/en/latest/topics/request-response.html?highlight=dont_filter#request-objects

관련 문제