How to handle IncompleteRead: in python

后端 未结 8 1646
面向向阳花
面向向阳花 2020-12-05 10:12

I am trying to fetch some data from a website. However it returns me incomplete read. The data I am trying to get is a huge set of nested links. I did some rese

8条回答
  •  [愿得一人]
    2020-12-05 10:47

    I just add a more exception to pass this problem.
    just like

    try:
        r = requests.get(url, timeout=timeout)
    
    except (requests.exceptions.ChunkedEncodingError, requests.ConnectionError) as e:
        logging.error("There is a error: %s" % e)
    

提交回复
热议问题