准备上传oss做云备份
This commit is contained in:
@@ -55,21 +55,23 @@ public class BTDownloadManager implements ApplicationContextAware {
|
||||
JSONObject json = JSONObject.parseObject(_json);
|
||||
download(item, json);
|
||||
} else {
|
||||
QQBotManager.getInstance().sendMessage(item.getTitle() + "\n下载失败");
|
||||
QQBotManager.getInstance().sendMessage(item.getTitle() + "\n下载失败\n"+getDmhyUrl(item));
|
||||
Log.i(item.getTitle() + "\n下载失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getRSSUrl(BangumiItem item) {
|
||||
String url = "https://api.rss2json.com/v1/api.json?rss_url=%s&api_key=wtfm5pebya13pnl8rtu51wfgfpte0mb9sap1foll&count=500";
|
||||
private String getDmhyUrl(BangumiItem item){
|
||||
String dmhyUrl = "http://share.dmhy.org/topics/rss/page/1/rss.xml?keyword=%s%s%s&order=date-desc";
|
||||
dmhyUrl = String.format(dmhyUrl,
|
||||
item.getTitlekey().replace(" ", "+"),
|
||||
"-1".equals(item.getCategories()) ? "" : String.format("&sort_id=%s", item.getCategories()),
|
||||
"-1".equals(item.getAuthor()) ? "" : String.format("&team_id=%s", item.getAuthor()));
|
||||
return dmhyUrl;
|
||||
}
|
||||
private String getRSSUrl(BangumiItem item) {
|
||||
String url = "https://api.rss2json.com/v1/api.json?rss_url=%s&api_key=wtfm5pebya13pnl8rtu51wfgfpte0mb9sap1foll&count=500";
|
||||
try {
|
||||
return String.format(url, URLEncoder.encode(dmhyUrl, "UTF-8"));
|
||||
return String.format(url, URLEncoder.encode(getDmhyUrl(item), "UTF-8"));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user