【发布时间】:2016-10-08 15:05:30
【问题描述】:
我一直在尝试访问 KissAnime 但是,我一直收到此错误:
org.jsoup.HttpStatusException:获取 URL 的 HTTP 错误。状态=503
当我尝试另一个 URL 时,例如。 https://www.google.com/,效果很好。
这是我的异步任务代码:
@Override
protected Void doInBackground(Void... params) {
try {
// Connect to the web site
Document document = Jsoup.connect("https://kissanime.to/AnimeList/")
.ignoreContentType(true)
.userAgent("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1")
.referrer("http://www.google.com")
.timeout(12000)
.followRedirects(true)
.get();
// Get the html document title
title = document.title();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
知道如何解决这个问题吗?
【问题讨论】:
-
我认为动机是反DoS工具they adopted(查看
cf_clearancecookie)。