기록하다

(해결)pyppeteer.errors.TimeoutError: Navigation Timeout Exceeded: 8000 ms exceeded.

메슈어 2022. 1. 19. 16:43

pyppeteer.errors.TimeoutError: Navigation Timeout Exceeded: 8000 ms exceeded.

 

pyppeteer.errors.TimeoutError: Navigation Timeout Exceeded: 8000 ms exceeded.

result.html.render() 함수를 호출하면,

session.get()에서 반환하는 html + javascript 코드 랜더링 결과값을 처리하는데 시간이 8초 이상 걸릴 때가 있다. 

이때, timeout=20 와 같이 더 오래 기다릴 수 있게 하면 위와 같은 에러를 방지할 수 있다. 

 

 

자료 출처 https://stackoverflow.com/questions/63653201/pyppeteer-errors-timeouterror-navigation-timeout-exceeded-8000-ms-exceeded

https://stackoverflow.com/questions/63653201/pyppeteer-errors-timeouterror-navigation-timeout-exceeded-8000-ms-exceeded

 

그래도 오류가 난다면 아래와 같이 javascript popup이 발생해서 무한으로 대기중인지 확인해본다. 

저는 requests_html 라이브러리를 사용해 render() 를 호출하는 도중 위와같은 페이지를 만났습니다. 

(이런 증상은 현재 해결책을 찾는 중입니다._

 

 

크롤링에 관심이 많은 분들 화이팅입니다.!