小编use*_*897的帖子

连接错误:"org.jsoup.UnsupportedMimeTypeException:未处理的内容类型"

当我尝试打开一个用jsoup解析的链接时,我收到一个错误.

连接命令:

Document doc = Jsoup.connect("http://www.rfi.ro/podcast/emisiune/174/feed.xml")
                .timeout(10 * 1000).get();
Run Code Online (Sandbox Code Playgroud)

抛出的错误:

Exception in thread "main" org.jsoup.UnsupportedMimeTypeException: Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml. Mimetype=application/rss+xml; charset=utf-8, URL=http://www.rfi.ro/podcast/emisiune/174/feed.xml
    at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:453)
    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 podcast.Pods.main(Pods.java:41)
Run Code Online (Sandbox Code Playgroud)

java httpconnection jsoup

31
推荐指数
1
解决办法
2万
查看次数

标签 统计

httpconnection ×1

java ×1

jsoup ×1