Closed cayde-6324 closed 1 year ago
PT 助手版本: v1.6.0.ba3d87e
PT 助手安装方式:edge市场安装
浏览器名称及版本:edge 111.0.1661.44 (正式版本) (64 位)
浏览器是否安装了其他插件:是
停用其他插件后是否正常工作:否
问题描述:
无法搜索莫妮卡站(monikadesign.uk)的种子,报错文本有如下两种
{ "message": "A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received" }
[Monika]没有定位到种子列表,或没有相关的种子
尝试过删除站点重新添加不能解决
相关截图:
重现步骤:站点设置-通过搜索选择Monika-勾选允许搜索和允许获取用户信息-点击完成-点击获取各站第一页种子或搜索任意关键字
请试下pre-release的版本先
PT 助手版本: v1.6.0.ba3d87e
PT 助手安装方式:edge市场安装
浏览器名称及版本:edge 111.0.1661.44 (正式版本) (64 位)
浏览器是否安装了其他插件:是
停用其他插件后是否正常工作:否
问题描述:
无法搜索莫妮卡站(monikadesign.uk)的种子,报错文本有如下两种
{ "message": "A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received" }
[Monika]没有定位到种子列表,或没有相关的种子
尝试过删除站点重新添加不能解决
相关截图:
日志如下
`{"data":{"isLogged":true,"site":{"activeURL":"https://monikadesign.uk/","allowGetUserInfo":true,"allowSearch":true,"collaborator":"fzlins","description":"一个以动画为主体,涵盖日语影视音乐的资源站,诣在为广大动画、日剧日影、ACG Live爱好者提供一个资源信息交流平台。","host":"monikadesign.uk","icon":"https://monikadesign.uk/favicon.ico","isCustom":false,"levelRequirements":[{"interval":"1","level":"1","name":"PowerUser","privilege":"访问邀请区","uploaded":"1TB"},{"interval":"2","level":"2","name":"SuperUser","privilege":"无","uploaded":"2TB"},{"interval":"3","level":"3","name":"ExtremeUser","privilege":"无","uploaded":"5TB"},{"interval":"6","level":"4","name":"InsaneUser","privilege":"自动通过候选","uploaded":"10TB"},{"interval":"12","level":"5","name":"Veteran","privilege":"个人全局双倍上传","uploaded":"15TB"}],"name":"Monika","schema":"UNIT3D","searchEntryConfig":{"area":[{"keyAutoMatch":"^(tt\\d+)$","name":"IMDB","queryString":"perPage=100&imdbId=$key$","replaceKey":["tt",""]}],"enabled":true,"fieldSelector":{"progress":{"selector":["button.btn.btn-success.btn-circle","button.btn.btn-warning.btn-circle, button.btn.btn-info.btn-circle",""],"switchFilters":[["100"],["0"],["null"]]},"status":{"selector":["button.btn.btn-success.btn-circle","button.btn.btn-warning.btn-circle","button.btn.btn-info.btn-circle"],"switchFilters":[["2"],["1"],["3"]]}},"name":"全部","page":"/torrents","parseScript":"(function(options, Searcher) {\n class Parser {\n constructor() {\n this.haveData = false;\n if (/\\/login/.test(options.responseText)) {\n options.status = ESearchResultParseStatus.needLogin; //`[${options.site.name}]需要登录后再搜索`;\n return;\n }\n\n options.isLogged = true;\n\n this.haveData = true;\n }\n\n /**\n * 获取搜索结果\n */\n getResult() {\n if (!this.haveData) {\n return [];\n }\n let site = options.site;\n site.searchEntryConfig = options.entry\n let selector =\n options.resultSelector || \"table.data-table\";\n let table = options.page.find(selector);\n // 获取种子列表行\n let rows = table.find(\"> tbody > tr\");\n if (rows.length == 0) {\n options.status = ESearchResultParseStatus.torrentTableIsEmpty; //`[${options.site.name}]没有定位到种子列表,或没有相关的种子`;\n return [];\n }\n let results = [];\n // 获取表头\n let header = table.find(\"> thead > tr > th\");\n let beginRowIndex = 0;\n if (header.length == 0) {\n beginRowIndex = 1;\n header = rows.eq(0).find(\"th,td\");\n }\n\n // 用于定位每个字段所列的位置\n let fieldIndex = {\n // 发布时间\n time: -1,\n // 大小\n size: -1,\n // 上传数量\n seeders: -1,\n // 下载数量\n leechers: -1,\n // 完成数量\n completed: -1,\n // 分类\n category: 0\n };\n\n if (site.url.lastIndexOf(\"/\") != site.url.length - 1) {\n site.url += \"/\";\n }\n\n // 获取字段所在的列\n for (let index = 0; index < header.length; index++) {\n let cell = header.eq(index);\n let text = cell.text();\n // 发布时间\n if (cell.html().match(\"created_at\")) {\n fieldIndex.time = index;\n continue;\n }\n\n // 大小\n if (cell.attr('class').indexOf(\"torrent-listings-size\") > -1 || cell.find(\"i.fa-database\").length) {\n fieldIndex.size = index;\n continue;\n }\n\n // 种子数\n if (cell.find(\"i.fa-arrow-alt-circle-up\").length) {\n fieldIndex.seeders = index;\n continue;\n }\n\n // 下载数\n if (cell.find(\"i.fa-arrow-alt-circle-down\").length) {\n fieldIndex.leechers = index;\n continue;\n }\n\n // 完成数\n if (cell.find(\"i.fa-check-circle\").length) {\n fieldIndex.completed = index;\n continue;\n }\n }\n\n try {\n // 遍历数据行\n for (let index = beginRowIndex; index < rows.length; index++) {\n const row = rows.eq(index);\n let cells = row.find(\">td\");\n\n let title = row.find(\"a.view-torrent\");\n if (title.length == 0) {\n continue;\n }\n let link = title.attr(\"href\");\n if (link && link.substr(0, 4) !== \"http\") {\n link = `${site.url}${link}`;\n }\n\n // 获取下载链接\n let url = \"\";\n\n let downloadURL = row.find(\"a[href*='/download/']\");\n if (downloadURL.length == 0) {\n downloadURL = row.find(\"a[href*='/download_check/']\");\n if (downloadURL.length > 0) {\n url = downloadURL\n .attr(\"href\")\n .replace(\"/download_check/\", \"/download/\");\n }\n } else {\n url = downloadURL.attr(\"href\");\n }\n\n if (url.length == 0) {\n continue;\n }\n\n if (url && url.substr(0, 4) !== \"http\") {\n url = `${site.url}${url}`;\n }\n\n let data = {\n title: title.text().trim(),\n subTitle: this.getSubTitle(title, row),\n link,\n url: url,\n size:\n cells\n .eq(fieldIndex.size)\n .text()\n .trim() || 0,\n time:\n fieldIndex.time == -1\n ? \"\"\n : cells\n .eq(fieldIndex.time)\n .find(\"span[title]\")\n .attr(\"title\") ||\n cells.eq(fieldIndex.time).text().replace('秒前', ' seconds ago').replace('秒前', ' seconds ago').replace('分钟前', ' minutes ago').replace('分鐘前', ' minutes ago').replace('天前', ' day ago').replace('小時前', ' hours ago').replace('小时前', ' hours ago').replace('周前', ' weeks ago').replace('个月前', ' months ago').replace('年前', ' years ago')||\n \"\",\n author: \"\",\n seeders:\n fieldIndex.seeders == -1\n ? \"\"\n : cells.eq(fieldIndex.seeders).text() || 0,\n leechers:\n fieldIndex.leechers == -1\n ? \"\"\n : cells.eq(fieldIndex.leechers).text() || 0,\n completed:\n fieldIndex.completed == -1\n ? \"\"\n : cells.eq(fieldIndex.completed).text() || 0,\n comments: 0,\n site: site,\n tags: Searcher.getRowTags(site, row),\n entryName: options.entry.name,\n category:\n fieldIndex.category == -1\n ? null\n : this.getCategory(cells.eq(fieldIndex.category)),\n progress: this.getFieldValue(row, cells, fieldIndex, \"progress\"),\n status: this.getFieldValue(row, cells, fieldIndex, \"status\")\n };\n results.push(data);\n }\n if (results.length == 0) {\n options.status = ESearchResultParseStatus.noTorrents; // `[${options.site.name}]没有搜索到相关的种子`;\n }\n } catch (error) {\n console.log(error);\n options.status = ESearchResultParseStatus.parseError;\n options.errorMsg = error.stack; //`[${options.site.name}]获取种子信息出错: ${error.stack}`;\n }\n\n return results;\n }\n\n /**\n * 获取标签\n * @param {*} row\n * @param {*} selectors\n * @return array\n */\n getTags(row, selectors) {\n let tags = [];\n if (selectors && selectors.length > 0) {\n selectors.forEach(item => {\n if (item.selector) {\n let result = row.find(item.selector);\n if (result.length) {\n tags.push({\n name: item.name,\n color: item.color\n });\n }\n }\n });\n }\n return tags;\n }\n\n /**\n * 获取副标题\n * @param {*} title\n * @param {*} row\n */\n getSubTitle(title, row) {\n return \"\";\n }\n\n /**\n * 获取分类\n * @param {*} cell 当前列\n */\n getCategory(cell) {\n let result = {\n name: cell.find(\"i:first\").attr(\"data-original-title\"),\n link: cell.find(\"a:first\").attr(\"href\")\n };\n if (result.name) {\n result.name = result.name.replace(\" torrent\", \"\");\n }\n return result;\n }\n\n getFieldValue(row, cells, fieldIndex, fieldName, returnCell) {\n let parent = row;\n let cell = null;\n if (\n cells &&\n fieldIndex &&\n fieldIndex[fieldName] !== undefined &&\n fieldIndex[fieldName] !== -1\n ) {\n cell = cells.eq(fieldIndex[fieldName]);\n parent = cell || row;\n }\n\n let result = Searcher.getFieldValue(site, parent, fieldName);\n\n if (!result && cell) {\n if (returnCell) {\n return cell;\n }\n result = cell.text();\n }\n\n return result;\n }\n }\n\n let parser = new Parser(options);\n options.results = parser.getResult();\n console.log(options.results);\n})(options, options.searcher);\n","parseScriptFile":"getSearchResult.js","queryString":"perPage=100&name=$key$","resultType":"html","torrentTagSelectors":[]},"tags":["影视","剧集","动漫"],"timezoneOffset":"+0800","url":"https://monikadesign.uk/","user":{"bonus":xxx,"bonusPage":"/users/bananice/bonus/earnings","bonusPerHour":xxx,"downloaded":xxx,"isLogged":true,"joinTime":xxx,"lastUpdateStatus":"success","lastUpdateTime":xxx,"levelName":"User","messageCount":"0","name":"xxx","seeding":xxx,"seedingSize":xxx,"uploaded":xxx,"uploads":xxx}}},"msg":"[Monika]没有定位到种子列表,或没有相关的种子","success":false}`重现步骤:站点设置-通过搜索选择Monika-勾选允许搜索和允许获取用户信息-点击完成-点击获取各站第一页种子或搜索任意关键字