タイムアウトでリトライ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
i = 0 while i < 20: try: driver.get("https://unipass.customs.go.kr/clip/index.do") print("成功") except TimeoutException: i = i + 1 print("Timeout, Retrying... (%(i)s/%(max)s)") continue else: i = i + 1 print("その他, Retrying...") continue |
コメントを残す