how to resolve jsoup error: unable to find valid certification path to requested target

后端 未结 3 953
耶瑟儿~
耶瑟儿~ 2021-01-11 16:45

I am trying to parse the html of the following URL:

https://www.smuc.ac.kr/mbs/smuc/jsp/board/list.jsp?boardId=6993&id=smuc_040100000000

I\'m getting the

3条回答
  •  天涯浪人
    2021-01-11 17:22


    This answer is outdated as JSoup has deprecated and removed the validateTLSCertificates method in version 1.12.1 (https://jsoup.org/news/release-1.12.1).

    You can ignore TSL validation, set validateTLSCertificates(false):

    Document document = Jsoup.connect("URL").timeout(10000).validateTLSCertificates(false).get();
    

    Since reading the page also takes a while, increase the timeout timeout(10000).

提交回复
热议问题