Skip to content

Commit

Permalink
Create uaa.com.js
Browse files Browse the repository at this point in the history
  • Loading branch information
OshekharO authored Feb 19, 2024
1 parent a203bd4 commit 80e0175
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions repo/uaa.com.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// ==MiruExtension==
// @name UAA视频
// @version v0.0.1
// @author wenmoux
// @lang zh-cn
// @license MIT
// @package uaa.com
// @type bangumi
// @icon https://www.uaa.com/assets/uaalogo.7acb1f90.svg
// @webSite https://www.uaa.com/api/video/app/video
// @nsfw true
// ==/MiruExtension==

export default class extends Extension {
async latest(page) {
const res = await this.request(
`/search?category=&orderType=1&origin=&page=${page}&searchType=1&size=32`,
);
const bangumi = [];
let array = res.model.data
array.shift()
console.log(array)
array.forEach((element) => {

bangumi.push({
id: element.url,
title: element.title,
url: element.id,
cover: element.coverUrl,
urls: [element.url],
desc: element.tags
})

});
return bangumi;
}

async search(kw, page) {
const res = await this.request(
`/search?category=&keyword=${kw}&orderType=0&origin=&page=${page}&searchType=1&size=12`,
);
const bangumi = [];
let array = res.model.data
array.forEach((element) => {
bangumi.push({
id: element.url,
title: element.title,
url: element.id,
cover: element.coverUrl,
urls: [element.url],
desc: element.tags
})

});
return bangumi;
}

async detail(url) {
const res = await this.request(`/intro?force=false&id=${url}&viewId=17080485428117155`);
const comicInfo = res.model;

return {
title: comicInfo.title,
desc: comicInfo.brief,
cover: comicInfo.coverUrl,
"episodes": [
{
"title": "default",
"urls": [
{
"name": "在线播放",
"url": comicInfo.url
}
]
}]
}
}

async watch(url) {
return {
type: "hls",
url: url
}
}
}

0 comments on commit 80e0175

Please sign in to comment.