diff --git a/SUPPORTED.md b/SUPPORTED.md index cb3c079..f4e732f 100644 --- a/SUPPORTED.md +++ b/SUPPORTED.md @@ -37,6 +37,7 @@ | HDTime | ✅ | ✅ | | HDU | ✅ | ✅ | | HH | ✅ | ❌ | +| HUNO | ✅ | ✅ | | HaresClub | ✅ | ✅ | | KEEPFRDS | ✅ | ✅ | | KG | ✅ | ✅ | @@ -72,5 +73,6 @@ | TeamHD | ✅ | ❌ | | UHDBits | ✅ | ✅ | | ZHUQUE | ❌ | ✅ | +| agsv | ✅ | ✅ | | fearnopeer | ✅ | ✅ | | iTS | ❌ | ✅ | diff --git a/src/config/HUNO.yaml b/src/config/HUNO.yaml new file mode 100644 index 0000000..e4c1ad2 --- /dev/null +++ b/src/config/HUNO.yaml @@ -0,0 +1,61 @@ +url: https://hawke.uno +host: hawke.uno +siteType: UNIT3D +icon: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAADOklEQVR4nL1U32/TVhT+kpUXeIAW/gd4Ytr+gT1XCBC/JJAm8RYJTaNqrmP73sRxC+w/mJCmTUKa4AUhBLET0rERDbQ9dR1FRRRBW8UJELa2lC52nNj1QddpsoYB2st2pE86Oj76fI6+7x7gf4gEiLp4TxBRQiLufW/IhkplCNhKJGsU1whIVExzaCtJr0b0NrFJyf5EREkU1vfgOu2O6z3izR+Zppms6/ruZ+n0HjLNZH/izbxLJsNeG4bdzMNy52B7q7C8FVjebNJqckzRDmKf71higteZmK0pYqXGxKrD+JzDeL6q68MxcZ+0sL4PRf8J7hLh9sYGii2K8UMYJX4lwrXl2XtfarOReYFe6vmormSprgj6U89vuMYFmT9ZSvN9XbIr1WFMBY9QIULB9VH0QvxEFMP2gmSp1QH7nvafVOkpE53nighW+AStigmqKSJ0GPdfZyepoRmPHpw5Mwzcak/EkxWabdzqEMptH5Zr4cZ6CRXq4Otp+mj0ixCH1TCfEuRzo7OQ1ktVxq2GlvNfqDmqMt6Wk77IGBNAuTOPckCw3Qh2K0DBH+2L9TMdw9lvKXlwLMIRLfrklE6vFHGs97nGxGhdEYGjiKihGtRQs/OA7UWw3BB3iGB5dtz5zfQ2mNJCAI5kKjiRJZwQlJC51PEzc2g6ldomc0fh9pqYJIfxsKaIaJCw4BZjEum9HuHRdxNS15NwGC++GiDsrWy5EYqtEHbzQH/lu3QcY9/1V/5Urqzmjv+9snagLoWRK2tyZWMeKHpGLIolRWkTyp02brol3PyrjDsU4OJvXVEOqeFkilNLzwULjJerab3UUHPtWJS03naN8/RczRnApaVdmAoe9m0jhZGW+XGLbZTL9PFJlRaZ6DzbYptYEMb99ew5eqkZD38/PbarO/uN13theY8Hje13jf1LbOyZe2f1mcj8iv7QzaieyZLE8qaxa4p4vDiW2Tv49G6v7oTdzMH27sP2lmNY3kzSbmoo0HZKpbYvMqHVGJ9xmFiOofD7TiabW9C0nb13/q7jkECZRnB1bWSgtpnLCzM3Pj7ijI+PyBz/OA4fOl9xbfB89Ug+fL7ejn9/YP/7eAMLS3CiKim0CAAAAABJRU5ErkJggg== +asSource: true +asTarget: true +uploadPath: /torrents/create?category_id=1 +torrentDownloadLinkSelector: a[href*="/torrents/download/"] +needDoubanInfo: true +seedDomSelector: .torrent__buttons+.panelV2 +search: + path: /torrents + replaceKey: + - tt + - "" + params: + name: "{name}" + imdbId: "{imdb}" + sortField: size +name: + selector: input[name="name"][class="form__text"] +description: + selector: "#bbcode-description" +imdb: + selector: "#autoimdb" +tmdb: + selector: "#autotmdb" +mediaInfo: + selector: textarea[name="mediainfo"] +anonymous: + selector: .form__group input[type="checkbox"][name="anon"] +torrent: + selector: input[type="file"][accept=".torrent"] +category: + selector: "#browsecat" + map: + movie: "1" + tv: "2" + tvPack: "2" +videoType: + selector: "#autotype" + map: + uhdbluray: "1" + bluray: "1" + remux: "3" + encode: "12" + web: "4" + hdtv: "6" + dvd: "1" + dvdrip: "12" + other: "" +resolution: + selector: "#autores" + map: + 4320p: "11" + 2160p: "1" + 1080p: "2" + 1080i: "3" + 720p: "5" + 576p: "6" + 480p: "8" diff --git a/src/source/unit3d.ts b/src/source/unit3d.ts index c09c572..4f6d0a9 100644 --- a/src/source/unit3d.ts +++ b/src/source/unit3d.ts @@ -53,7 +53,7 @@ export default async () => { .siblings('.table-responsive').find('.panel-body').clone(); descriptionDom.find('#collection_waypoint').remove(); let mediaInfoOrBDInfo = $('.decoda-code code').text(); - if (CURRENT_SITE_NAME.match(/Blutopia|Aither|fearnopeer/i)) { + if (CURRENT_SITE_NAME.match(/Blutopia|Aither|fearnopeer|HUNO/i)) { const title = $('.meta__title').text().trim(); movieName = title.replace(/\(.+\)/g, ''); IMDBYear = title.match(/\((\d{4})\)/)?.[1] ?? ''; @@ -116,7 +116,7 @@ const getBasicInfo = () => { Resolution: 'Resolution', resolution: 'Resolution', }; - if (!CURRENT_SITE_NAME.match(/Blutopia|Aither|fearnopeer/i)) { + if (!CURRENT_SITE_NAME.match(/Blutopia|Aither|fearnopeer|HUNO/i)) { const lineSelector = $('#meta-info+.meta-general>.panel:has(".table-responsive"):first table tr'); lineSelector.each((index, element) => { const key = $(element).find('td:first').text().replace(/\s|\n/g, ''); diff --git a/src/target/helper.ts b/src/target/helper.ts index 5e748a2..8c81a3d 100644 --- a/src/target/helper.ts +++ b/src/target/helper.ts @@ -118,7 +118,7 @@ export default class ExportHelper { if (CURRENT_SITE_NAME.match(/HDRoute|HDSpace/)) { $(imdbSelector).val(imdbId?.replace('tt', '') ?? ''); - } else if (CURRENT_SITE_NAME.match(/Blutopia|fearnopeer|HDPOST|ACM|Aither|Concertos|MDU|LST/)) { + } else if (CURRENT_SITE_NAME.match(/Blutopia|fearnopeer|HDPOST|ACM|Aither|Concertos|MDU|LST|HUNO/)) { let tmdbId = ''; const fillIMDBId = this.currentSiteInfo.siteType === 'UNIT3D' ? imdbId.replace('tt', '') : imdbId; $(imdbSelector).val(fillIMDBId); @@ -126,7 +126,7 @@ export default class ExportHelper { tmdbId = data.id; $(this.currentSiteInfo.tmdb.selector).val(tmdbId); }); - if (CURRENT_SITE_NAME.match(/Blutopia|fearnopeer|Aither|MDU|LST/)) { + if (CURRENT_SITE_NAME.match(/Blutopia|fearnopeer|Aither|MDU|LST|HUNO/)) { $('#torrent').on('change', () => { $(imdbSelector).val(fillIMDBId); $(this.currentSiteInfo.tmdb.selector).val(tmdbId); @@ -179,7 +179,7 @@ export default class ExportHelper { } if (this.currentSiteInfo.mediaInfo) { - if (CURRENT_SITE_NAME.match(/^(Blutopia|fearnopeer|Aither|MDU)/)) { + if (CURRENT_SITE_NAME.match(/^(Blutopia|fearnopeer|Aither|MDU|HUNO)/)) { const selector = isBluray ? 'textarea[name="bdinfo"]' : this.currentSiteInfo.mediaInfo.selector; $(selector).val(mediaInfos[0]); description = description.replace(mediaInfos[0].trim(), ''); @@ -222,7 +222,7 @@ export default class ExportHelper { } } // Blutopia可以通过设置为显示缩略图 - if (CURRENT_SITE_NAME.match(/Blutopia|fearnopeer|Aither|MDU/)) { + if (CURRENT_SITE_NAME.match(/Blutopia|fearnopeer|Aither|MDU|HUNO/)) { if (this.info.sourceSite === 'PTP') { description = buildPTPDescription(this.info); } @@ -242,7 +242,7 @@ export default class ExportHelper { } } - if (CURRENT_SITE_NAME.match(/Blutopia|fearnopeer|Aither/)) { + if (CURRENT_SITE_NAME.match(/Blutopia|fearnopeer|Aither|HUNO/)) { description = description.replace(/\[align(=(.+?))\]((.|\n)+?)\[\/align\]/g, '[$2]$3[/$2]'); description = description.replace(/\[(\/)?hide(?:=(.+?))?\]/g, (match, p1, p2) => { const slash = p1 || ''; diff --git a/src/target/site-operations.ts b/src/target/site-operations.ts index b03f2d8..ffb694b 100644 --- a/src/target/site-operations.ts +++ b/src/target/site-operations.ts @@ -91,6 +91,14 @@ export const SITE_OPERATIONS = { return info; }, }, + HUNO: { + titleHandler: (info:TorrentInfo.TargetTorrentInfo) => { + const isWebSource = !!info.source.match(/web/gi); + const title = fixTorrentTitle(info.title, isWebSource); + info.title = title; + return info; + }, + }, KEEPFRDS: { handleDescription: (info:TorrentInfo.TargetTorrentInfo) => { let { description, screenshots } = info;