diff --git a/src/main/java/com/yutou/nas/utils/BTDownloadManager.java b/src/main/java/com/yutou/nas/utils/BTDownloadManager.java index f68620e..cda512e 100644 --- a/src/main/java/com/yutou/nas/utils/BTDownloadManager.java +++ b/src/main/java/com/yutou/nas/utils/BTDownloadManager.java @@ -16,6 +16,7 @@ import java.io.File; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; +import java.util.List; public class BTDownloadManager implements ApplicationContextAware { private static String tmpJson = "{\"status\":\"ok\",\"feed\":{\"url\":\"http://share.dmhy.org/topics/rss/page/1/rss.xml?keyword=无职转生&order=date-desc&sort_id=2&team_id=604\",\"title\":\"c.c动漫-動畫-動漫花園資源網\",\"link\":\"http://share.dmhy.org/\",\"author\":\"\",\"description\":\"動漫花園資訊網是一個動漫愛好者交流的平台,提供最及時,最全面的動畫,漫畫,動漫音樂,動漫下載,BT,ED,動漫遊戲,資訊,分享,交流,讨论.\",\"image\":\"\"},\"items\":[{\"title\":\"\u200B[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][11][BIG5][1080P][MP4]\",\"pubDate\":\"2021-03-25 07:11:12\",\"link\":\"http://share.dmhy.org/topics/view/563676_c_c_1_11_BIG5_1080P_MP4.html\",\"guid\":\"http://share.dmhy.org/topics/view/563676_c_c_1_11_BIG5_1080P_MP4.html\",\"author\":\"lleeopen\",\"thumbnail\":\"https://img.vim-cn.com/43/a8c19df5571ea68c64ed4945cc0187bd82e2f1.jpg\",\"description\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n

\\n\",\"content\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n

\\n\",\"enclosure\":{\"link\":\"magnet:?xt=urn:btih:LVYN5MDZTBFRNNSPYYXKOKJA5PNGB4FD&dn=&tr=http://104.238.198.186:8000/announce&tr=udp://104.238.198.186:8000/announce&tr=http://tracker.openbittorrent.com:80/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=http://tracker4.itzmx.com:2710/announce&tr=http://tracker.publicbt.com:80/announce&tr=http://tracker.prq.to/announce&tr=http://open.acgtracker.com:1096/announce&tr=https://t-115.rhcloud.com/only_for_ylbud&tr=http://tracker1.itzmx.com:8080/announce&tr=http://tracker2.itzmx.com:6961/announce&tr=udp://tracker1.itzmx.com:8080/announce&tr=udp://tracker2.itzmx.com:6961/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=udp://tracker4.itzmx.com:2710/announce&tr=http://tr.bangumi.moe:6969/announce&tr=http://t.nyaatracker.com/announce&tr=http://open.nyaatorrents.info:6544/announce&tr=http://t2.popgo.org:7456/annonce&tr=http://share.camoe.cn:8080/announce&tr=http://opentracker.acgnx.se/announce&tr=http://tracker.acgnx.se/announce&tr=http://nyaa.tracker.wf:7777/announce&tr=http://t.acg.rip:6699/announce&tr=http://opentracker.acgnx.com:6869/announce\",\"type\":\"application/x-bittorrent\",\"length\":1},\"categories\":[\"動畫\"]},{\"title\":\"\u200B[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][10][BIG5][1080P][MP4]\",\"pubDate\":\"2021-03-15 05:12:42\",\"link\":\"http://share.dmhy.org/topics/view/562725_c_c_1_10_BIG5_1080P_MP4.html\",\"guid\":\"http://share.dmhy.org/topics/view/562725_c_c_1_10_BIG5_1080P_MP4.html\",\"author\":\"lleeopen\",\"thumbnail\":\"https://img.vim-cn.com/43/a8c19df5571ea68c64ed4945cc0187bd82e2f1.jpg\",\"description\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"content\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"enclosure\":{\"link\":\"magnet:?xt=urn:btih:QWEVVDWHSWISWGLOQJWD2PRHP3OYJBD3&dn=&tr=http://104.238.198.186:8000/announce&tr=udp://104.238.198.186:8000/announce&tr=http://tracker.openbittorrent.com:80/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=http://tracker4.itzmx.com:2710/announce&tr=http://tracker.publicbt.com:80/announce&tr=http://tracker.prq.to/announce&tr=http://open.acgtracker.com:1096/announce&tr=https://t-115.rhcloud.com/only_for_ylbud&tr=http://tracker1.itzmx.com:8080/announce&tr=http://tracker2.itzmx.com:6961/announce&tr=udp://tracker1.itzmx.com:8080/announce&tr=udp://tracker2.itzmx.com:6961/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=udp://tracker4.itzmx.com:2710/announce&tr=http://tr.bangumi.moe:6969/announce&tr=http://t.nyaatracker.com/announce&tr=http://open.nyaatorrents.info:6544/announce&tr=http://t2.popgo.org:7456/annonce&tr=http://share.camoe.cn:8080/announce&tr=http://opentracker.acgnx.se/announce&tr=http://tracker.acgnx.se/announce&tr=http://nyaa.tracker.wf:7777/announce&tr=http://t.acg.rip:6699/announce&tr=http://opentracker.acgnx.com:6869/announce\",\"type\":\"application/x-bittorrent\",\"length\":1},\"categories\":[\"動畫\"]},{\"title\":\"\u200B[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][09][BIG5][1080P][MP4]\",\"pubDate\":\"2021-03-14 12:56:28\",\"link\":\"http://share.dmhy.org/topics/view/562653_c_c_1_09_BIG5_1080P_MP4.html\",\"guid\":\"http://share.dmhy.org/topics/view/562653_c_c_1_09_BIG5_1080P_MP4.html\",\"author\":\"lleeopen\",\"thumbnail\":\"https://img.vim-cn.com/43/a8c19df5571ea68c64ed4945cc0187bd82e2f1.jpg\",\"description\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"content\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"enclosure\":{\"link\":\"magnet:?xt=urn:btih:Z6M3M7Y5YTIKY4GGCG7PGEP3WWGORS7T&dn=&tr=http://104.238.198.186:8000/announce&tr=udp://104.238.198.186:8000/announce&tr=http://tracker.openbittorrent.com:80/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=http://tracker4.itzmx.com:2710/announce&tr=http://tracker.publicbt.com:80/announce&tr=http://tracker.prq.to/announce&tr=http://open.acgtracker.com:1096/announce&tr=https://t-115.rhcloud.com/only_for_ylbud&tr=http://tracker1.itzmx.com:8080/announce&tr=http://tracker2.itzmx.com:6961/announce&tr=udp://tracker1.itzmx.com:8080/announce&tr=udp://tracker2.itzmx.com:6961/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=udp://tracker4.itzmx.com:2710/announce&tr=http://tr.bangumi.moe:6969/announce&tr=http://t.nyaatracker.com/announce&tr=http://open.nyaatorrents.info:6544/announce&tr=http://t2.popgo.org:7456/annonce&tr=http://share.camoe.cn:8080/announce&tr=http://opentracker.acgnx.se/announce&tr=http://tracker.acgnx.se/announce&tr=http://nyaa.tracker.wf:7777/announce&tr=http://t.acg.rip:6699/announce&tr=http://opentracker.acgnx.com:6869/announce\",\"type\":\"application/x-bittorrent\",\"length\":1},\"categories\":[\"動畫\"]},{\"title\":\"\u200B[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][08][BIG5][1080P][MP4]\",\"pubDate\":\"2021-03-14 12:56:00\",\"link\":\"http://share.dmhy.org/topics/view/562652_c_c_1_08_BIG5_1080P_MP4.html\",\"guid\":\"http://share.dmhy.org/topics/view/562652_c_c_1_08_BIG5_1080P_MP4.html\",\"author\":\"lleeopen\",\"thumbnail\":\"https://img.vim-cn.com/43/a8c19df5571ea68c64ed4945cc0187bd82e2f1.jpg\",\"description\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"content\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"enclosure\":{\"link\":\"magnet:?xt=urn:btih:BMXA6AZF7BCYQ2CIZOS5I6XPTXUZ2W3E&dn=&tr=http://104.238.198.186:8000/announce&tr=udp://104.238.198.186:8000/announce&tr=http://tracker.openbittorrent.com:80/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=http://tracker4.itzmx.com:2710/announce&tr=http://tracker.publicbt.com:80/announce&tr=http://tracker.prq.to/announce&tr=http://open.acgtracker.com:1096/announce&tr=https://t-115.rhcloud.com/only_for_ylbud&tr=http://tracker1.itzmx.com:8080/announce&tr=http://tracker2.itzmx.com:6961/announce&tr=udp://tracker1.itzmx.com:8080/announce&tr=udp://tracker2.itzmx.com:6961/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=udp://tracker4.itzmx.com:2710/announce&tr=http://tr.bangumi.moe:6969/announce&tr=http://t.nyaatracker.com/announce&tr=http://open.nyaatorrents.info:6544/announce&tr=http://t2.popgo.org:7456/annonce&tr=http://share.camoe.cn:8080/announce&tr=http://opentracker.acgnx.se/announce&tr=http://tracker.acgnx.se/announce&tr=http://nyaa.tracker.wf:7777/announce&tr=http://t.acg.rip:6699/announce&tr=http://opentracker.acgnx.com:6869/announce\",\"type\":\"application/x-bittorrent\",\"length\":1},\"categories\":[\"動畫\"]},{\"title\":\"\u200B[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][07][BIG5][1080P][MP4]\",\"pubDate\":\"2021-02-23 09:41:47\",\"link\":\"http://share.dmhy.org/topics/view/560768_c_c_1_07_BIG5_1080P_MP4.html\",\"guid\":\"http://share.dmhy.org/topics/view/560768_c_c_1_07_BIG5_1080P_MP4.html\",\"author\":\"lleeopen\",\"thumbnail\":\"https://img.vim-cn.com/43/a8c19df5571ea68c64ed4945cc0187bd82e2f1.jpg\",\"description\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"content\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"enclosure\":{\"link\":\"magnet:?xt=urn:btih:DDIM47E2UJAXRV54JJQFFPJ7SLYZZYQJ&dn=&tr=http://104.238.198.186:8000/announce&tr=udp://104.238.198.186:8000/announce&tr=http://tracker.openbittorrent.com:80/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=http://tracker4.itzmx.com:2710/announce&tr=http://tracker.publicbt.com:80/announce&tr=http://tracker.prq.to/announce&tr=http://open.acgtracker.com:1096/announce&tr=https://t-115.rhcloud.com/only_for_ylbud&tr=http://tracker1.itzmx.com:8080/announce&tr=http://tracker2.itzmx.com:6961/announce&tr=udp://tracker1.itzmx.com:8080/announce&tr=udp://tracker2.itzmx.com:6961/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=udp://tracker4.itzmx.com:2710/announce&tr=http://tr.bangumi.moe:6969/announce&tr=http://t.nyaatracker.com/announce&tr=http://open.nyaatorrents.info:6544/announce&tr=http://t2.popgo.org:7456/annonce&tr=http://share.camoe.cn:8080/announce&tr=http://opentracker.acgnx.se/announce&tr=http://tracker.acgnx.se/announce&tr=http://nyaa.tracker.wf:7777/announce&tr=http://t.acg.rip:6699/announce&tr=http://opentracker.acgnx.com:6869/announce\",\"type\":\"application/x-bittorrent\",\"length\":1},\"categories\":[\"動畫\"]},{\"title\":\"\u200B[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][06][BIG5][1080P][MP4]\",\"pubDate\":\"2021-02-14 16:51:36\",\"link\":\"http://share.dmhy.org/topics/view/559914_c_c_1_06_BIG5_1080P_MP4.html\",\"guid\":\"http://share.dmhy.org/topics/view/559914_c_c_1_06_BIG5_1080P_MP4.html\",\"author\":\"lleeopen\",\"thumbnail\":\"https://img.vim-cn.com/43/a8c19df5571ea68c64ed4945cc0187bd82e2f1.jpg\",\"description\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"content\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"enclosure\":{\"link\":\"magnet:?xt=urn:btih:MFQR2G2AEZLHXONGKII47FXP2DPE4C3G&dn=&tr=http://104.238.198.186:8000/announce&tr=udp://104.238.198.186:8000/announce&tr=http://tracker.openbittorrent.com:80/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=http://tracker4.itzmx.com:2710/announce&tr=http://tracker.publicbt.com:80/announce&tr=http://tracker.prq.to/announce&tr=http://open.acgtracker.com:1096/announce&tr=https://t-115.rhcloud.com/only_for_ylbud&tr=http://tracker1.itzmx.com:8080/announce&tr=http://tracker2.itzmx.com:6961/announce&tr=udp://tracker1.itzmx.com:8080/announce&tr=udp://tracker2.itzmx.com:6961/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=udp://tracker4.itzmx.com:2710/announce&tr=http://tr.bangumi.moe:6969/announce&tr=http://t.nyaatracker.com/announce&tr=http://open.nyaatorrents.info:6544/announce&tr=http://t2.popgo.org:7456/annonce&tr=http://share.camoe.cn:8080/announce&tr=http://opentracker.acgnx.se/announce&tr=http://tracker.acgnx.se/announce&tr=http://nyaa.tracker.wf:7777/announce&tr=http://t.acg.rip:6699/announce&tr=http://opentracker.acgnx.com:6869/announce\",\"type\":\"application/x-bittorrent\",\"length\":1},\"categories\":[\"動畫\"]},{\"title\":\"\u200B[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][05][BIG5][1080P][MP4]\",\"pubDate\":\"2021-02-07 16:33:23\",\"link\":\"http://share.dmhy.org/topics/view/559282_c_c_1_05_BIG5_1080P_MP4.html\",\"guid\":\"http://share.dmhy.org/topics/view/559282_c_c_1_05_BIG5_1080P_MP4.html\",\"author\":\"lleeopen\",\"thumbnail\":\"https://img.vim-cn.com/43/a8c19df5571ea68c64ed4945cc0187bd82e2f1.jpg\",\"description\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"content\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"enclosure\":{\"link\":\"magnet:?xt=urn:btih:TUDQWT6OAHYS2LFTCURHRLNZS6PVZXX5&dn=&tr=http://104.238.198.186:8000/announce&tr=udp://104.238.198.186:8000/announce&tr=http://tracker.openbittorrent.com:80/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=http://tracker4.itzmx.com:2710/announce&tr=http://tracker.publicbt.com:80/announce&tr=http://tracker.prq.to/announce&tr=http://open.acgtracker.com:1096/announce&tr=https://t-115.rhcloud.com/only_for_ylbud&tr=http://tracker1.itzmx.com:8080/announce&tr=http://tracker2.itzmx.com:6961/announce&tr=udp://tracker1.itzmx.com:8080/announce&tr=udp://tracker2.itzmx.com:6961/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=udp://tracker4.itzmx.com:2710/announce&tr=http://tr.bangumi.moe:6969/announce&tr=http://t.nyaatracker.com/announce&tr=http://open.nyaatorrents.info:6544/announce&tr=http://t2.popgo.org:7456/annonce&tr=http://share.camoe.cn:8080/announce&tr=http://opentracker.acgnx.se/announce&tr=http://tracker.acgnx.se/announce&tr=http://nyaa.tracker.wf:7777/announce&tr=http://t.acg.rip:6699/announce&tr=http://opentracker.acgnx.com:6869/announce\",\"type\":\"application/x-bittorrent\",\"length\":1},\"categories\":[\"動畫\"]},{\"title\":\"\u200B[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][04][BIG5][1080P][MP4]\",\"pubDate\":\"2021-01-31 16:36:34\",\"link\":\"http://share.dmhy.org/topics/view/558624_c_c_1_04_BIG5_1080P_MP4.html\",\"guid\":\"http://share.dmhy.org/topics/view/558624_c_c_1_04_BIG5_1080P_MP4.html\",\"author\":\"lleeopen\",\"thumbnail\":\"https://img.vim-cn.com/43/a8c19df5571ea68c64ed4945cc0187bd82e2f1.jpg\",\"description\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"content\":\"\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"enclosure\":{\"link\":\"magnet:?xt=urn:btih:MVJ3F3DGW5Y4Z7LONWEWN6GBSQAC3TKQ&dn=&tr=http://104.238.198.186:8000/announce&tr=udp://104.238.198.186:8000/announce&tr=http://tracker.openbittorrent.com:80/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=http://tracker4.itzmx.com:2710/announce&tr=http://tracker.publicbt.com:80/announce&tr=http://tracker.prq.to/announce&tr=http://open.acgtracker.com:1096/announce&tr=https://t-115.rhcloud.com/only_for_ylbud&tr=http://tracker1.itzmx.com:8080/announce&tr=http://tracker2.itzmx.com:6961/announce&tr=udp://tracker1.itzmx.com:8080/announce&tr=udp://tracker2.itzmx.com:6961/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=udp://tracker4.itzmx.com:2710/announce&tr=http://tr.bangumi.moe:6969/announce&tr=http://t.nyaatracker.com/announce&tr=http://open.nyaatorrents.info:6544/announce&tr=http://t2.popgo.org:7456/annonce&tr=http://share.camoe.cn:8080/announce&tr=http://opentracker.acgnx.se/announce&tr=http://tracker.acgnx.se/announce&tr=http://nyaa.tracker.wf:7777/announce&tr=http://t.acg.rip:6699/announce&tr=http://opentracker.acgnx.com:6869/announce\",\"type\":\"application/x-bittorrent\",\"length\":1},\"categories\":[\"動畫\"]},{\"title\":\"\u200B[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][03][BIG5][1080P][MP4]\",\"pubDate\":\"2021-01-25 05:27:50\",\"link\":\"http://share.dmhy.org/topics/view/558007_c_c_1_03_BIG5_1080P_MP4.html\",\"guid\":\"http://share.dmhy.org/topics/view/558007_c_c_1_03_BIG5_1080P_MP4.html\",\"author\":\"lleeopen\",\"thumbnail\":\"https://img.vim-cn.com/43/a8c19df5571ea68c64ed4945cc0187bd82e2f1.jpg\",\"description\":\"\\n

[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][03][BIG5][1080P][MP4]

\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"content\":\"\\n

[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][03][BIG5][1080P][MP4]

\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"enclosure\":{\"link\":\"magnet:?xt=urn:btih:OR6WDFDYDAPOGFR3FY3LLCF25P3PHUTG&dn=&tr=http://104.238.198.186:8000/announce&tr=udp://104.238.198.186:8000/announce&tr=http://tracker.openbittorrent.com:80/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=http://tracker4.itzmx.com:2710/announce&tr=http://tracker.publicbt.com:80/announce&tr=http://tracker.prq.to/announce&tr=http://open.acgtracker.com:1096/announce&tr=https://t-115.rhcloud.com/only_for_ylbud&tr=http://tracker1.itzmx.com:8080/announce&tr=http://tracker2.itzmx.com:6961/announce&tr=udp://tracker1.itzmx.com:8080/announce&tr=udp://tracker2.itzmx.com:6961/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=udp://tracker4.itzmx.com:2710/announce&tr=http://tr.bangumi.moe:6969/announce&tr=http://t.nyaatracker.com/announce&tr=http://open.nyaatorrents.info:6544/announce&tr=http://t2.popgo.org:7456/annonce&tr=http://share.camoe.cn:8080/announce&tr=http://opentracker.acgnx.se/announce&tr=http://tracker.acgnx.se/announce&tr=http://nyaa.tracker.wf:7777/announce&tr=http://t.acg.rip:6699/announce&tr=http://opentracker.acgnx.com:6869/announce\",\"type\":\"application/x-bittorrent\",\"length\":1},\"categories\":[\"動畫\"]},{\"title\":\"\u200B[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][02][BIG5][1080P][MP4]\",\"pubDate\":\"2021-01-17 16:35:55\",\"link\":\"http://share.dmhy.org/topics/view/557306_c_c_1_02_BIG5_1080P_MP4.html\",\"guid\":\"http://share.dmhy.org/topics/view/557306_c_c_1_02_BIG5_1080P_MP4.html\",\"author\":\"lleeopen\",\"thumbnail\":\"https://img.vim-cn.com/43/a8c19df5571ea68c64ed4945cc0187bd82e2f1.jpg\",\"description\":\"\\n

[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][02][BIG5][1080P][MP4]

\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"content\":\"\\n

[c.c動漫][1月新番][無職轉生~到了異世界就拿出真本事~][02][BIG5][1080P][MP4]

\\n

P.s.請使用正規的BT軟件下載(utorrent、qbittorrent、bitcomet),下載完成之後不要立即關閉下載軟件,盡量保持上傳一段時間~~

\\n


\\n\",\"enclosure\":{\"link\":\"magnet:?xt=urn:btih:TGON2SU75VGPYQBOHMCXF7M6MNSYS7J3&dn=&tr=http://104.238.198.186:8000/announce&tr=udp://104.238.198.186:8000/announce&tr=http://tracker.openbittorrent.com:80/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=http://tracker4.itzmx.com:2710/announce&tr=http://tracker.publicbt.com:80/announce&tr=http://tracker.prq.to/announce&tr=http://open.acgtracker.com:1096/announce&tr=https://t-115.rhcloud.com/only_for_ylbud&tr=http://tracker1.itzmx.com:8080/announce&tr=http://tracker2.itzmx.com:6961/announce&tr=udp://tracker1.itzmx.com:8080/announce&tr=udp://tracker2.itzmx.com:6961/announce&tr=udp://tracker3.itzmx.com:6961/announce&tr=udp://tracker4.itzmx.com:2710/announce&tr=http://tr.bangumi.moe:6969/announce&tr=http://t.nyaatracker.com/announce&tr=http://open.nyaatorrents.info:6544/announce&tr=http://t2.popgo.org:7456/annonce&tr=http://share.camoe.cn:8080/announce&tr=http://opentracker.acgnx.se/announce&tr=http://tracker.acgnx.se/announce&tr=http://nyaa.tracker.wf:7777/announce&tr=http://t.acg.rip:6699/announce&tr=http://opentracker.acgnx.com:6869/announce\",\"type\":\"application/x-bittorrent\",\"length\":1},\"categories\":[\"動畫\"]}]}"; @@ -36,7 +37,19 @@ public class BTDownloadManager implements ApplicationContextAware { private BTDownloadManager() { } - public String getRSSUrl(BangumiItem item) { + public void start() { + List list = bangumiService.getAllBangumi(); + for (BangumiItem item : list) { + String url = getRSSUrl(item); + String _json = HttpTools.get(url); + if (!StringUtils.isEmpty(_json)) { + JSONObject json = JSONObject.parseObject(_json); + download(item, json); + } + } + } + + private String getRSSUrl(BangumiItem item) { String url = "https://api.rss2json.com/v1/api.json?rss_url=%s&api_key=wtfm5pebya13pnl8rtu51wfgfpte0mb9sap1foll&count=500"; String dmhyUrl = "http://share.dmhy.org/topics/rss/page/1/rss.xml?keyword=%s%s%s&order=date-desc"; dmhyUrl = String.format(dmhyUrl, @@ -61,38 +74,43 @@ public class BTDownloadManager implements ApplicationContextAware { //添加到下载器 if (download(bangumiItem.getTitle(), item.getJSONObject("enclosure").getString("link"))) { //发通知到QQ + JSONArray array = getDownload(bangumiItem.getTitle()); + array.add(item.getString("title")); + RedisTools.set(bangumiItem.getTitle(), item.getString("title")); if (item.containsKey("thumbnail")) { HttpTools.download(item.getString("thumbnail"), bangumiItem.getTitle() + ".jpg", new DownloadInterface() { @Override public void onDownload(File file) { super.onDownload(file); - onSend(file,item); + onSend(file, item); } @Override public void onError(Exception e) { super.onError(e); - onSend(null,item); + onSend(null, item); } }); - }else{ - onSend(null,item); + } else { + onSend(null, item); } } } } } } + public void onSend(File file, JSONObject item) { - String text="启动下载器\n已提交到下载:"+item.getString("title"); - if(file==null){ - QQBotManager.getInstance().sendMessage(text); - }else{ - QQBotManager.getInstance().sendMessage(file,text); - } + String text = "启动下载器\n已提交到下载:" + item.getString("title"); + if (file == null) { + QQBotManager.getInstance().sendMessage(text); + } else { + QQBotManager.getInstance().sendMessage(file, text); + } } + public boolean download(String title, String url) { try { Runtime.getRuntime().exec(new String[]{"sh"