Murtaza rizvi 7 달 전
committed by GitHub
부모
커밋
e07d7ad001
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. +5
    -3
      scripts/validate/links.py

+ 5
- 3
scripts/validate/links.py 파일 보기

@@ -3,11 +3,15 @@
import re
import sys
import random
import ssl
from typing import List, Tuple

import requests
from requests.models import Response

ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

def find_links_in_text(text: str) -> List[str]:
"""Find links in a text and return a list of URLs."""
@@ -175,9 +179,7 @@ def check_if_link_is_working(link: str) -> Tuple[bool, str]:
has_error = True
error_message = f'ERR:CLT: {code} : {link}'

except requests.exceptions.SSLError as error:
has_error = True
error_message = f'ERR:SSL: {error} : {link}'

except requests.exceptions.ConnectionError as error:
has_error = True


불러오는 중...
취소
저장