我想使用 Jsoup 连接 https url 我遵循如何使用 Jsoup 通过 HTTPS 连接??
但现在我得到
Exception in thread "main" org.jsoup.HttpStatusException: HTTP error fetching URL. Status=401, URL=myurl
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:435)
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:410)
at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:164)
at org.jsoup.helper.HttpConnection.get(HttpConnection.java:153)
at FIndItNow.main(FIndItNow.java:27)
知道如何解决这个问题吗?
我打电话给喜欢
Document doc = Jsoup.connect(myurl).userAgent("Mozilla").get();