tmp
This commit is contained in:
parent
0c010beb54
commit
e38a226795
@ -1,6 +1,6 @@
|
||||
const Router = require("koa-router")
|
||||
const { route } = require(".")
|
||||
const { serach, getinfo } = require("../util/douban")
|
||||
const { serach, getinfo } = require("../util/ptgen")
|
||||
|
||||
const router = new Router({
|
||||
prefix:"/videoInfo"
|
||||
|
@ -2,7 +2,7 @@ const axios = require("axios")
|
||||
const puppeteer = require("puppeteer")
|
||||
|
||||
async function serach(name) {
|
||||
const list = await axios.get(`https://ptgen.theluyuan.com/?search=${name}&source=douban`, {
|
||||
const list = await axios.get(`https://pt.zmpt.cc/Ptgen?search=${name}`, {
|
||||
proxy: false,
|
||||
})
|
||||
return list.data.data
|
@ -1 +1 @@
|
||||
import{a as h}from"./axios-4a70c6fc.js";import{_ as E,r as d,a as n,o as w,c as L,w as a,b as e,d as r,e as i,f as b,g as U,F as N,E as x,t as F,p as M,h as R}from"./index-105f30a6.js";const j=c=>(M("data-v-ef30d7a3"),c=c(),R(),c),z=j(()=>r("div",{class:"card-header"},[r("span",null,"Video Download Test")],-1)),Q={style:{display:"flex",width:"100%"}},A={style:{display:"flex"}},G={style:{display:"flex"}},H={style:{width:"100%",height:"100%","overflow-y":"auto"}},J={__name:"downloadTest",setup(c){const p=d(!1),l=d({name:"https://v.qq.com/x/cover/mzc002007vp35qj.html",start:1,save:localStorage.getItem("save")}),m=d([]),_=d();function V(){h.get("/getQqList",{params:{url:l.value.name}}).then(t=>{m.value=t.data})}function k(){_.value.clearSelection();for(let t=l.value.start-1;t<m.value.length;t++)console.log(t),_.value.toggleRowSelection(m.value[t],void 0)}const v=d([]);async function C(){let t=_.value.getSelectionRows();if(t.length===0){x({showClose:!0,message:"请选择要下载的剧集",type:"error"});return}if(!l.value.save){x({showClose:!0,message:"请填写下载位置",type:"error"});return}p.value=!0,localStorage.setItem("save",l.value.save);for(let o of t)await h.get("/startDown",{params:{...o,save:l.value.save+"/"+o.title.split(" ")[0]}});x({showClose:!0,message:"添加完成",type:"success"})}const S=new EventSource("/msg");S.onmessage=t=>{v.value.length>200&&v.value.splice(200),v.value.unshift(t.data)};function I(){p.value=!0}function T(){h.get("/test",{params:{url:l.value.name}}).then(t=>{console.log(t.data)})}return(t,o)=>{const f=n("el-input"),u=n("el-button"),g=n("el-form-item"),y=n("el-table-column"),q=n("el-table"),B=n("el-dialog"),D=n("el-card");return w(),L(D,{class:"box-card"},{header:a(()=>[z]),default:a(()=>[e(g,{label:"视频地址"},{default:a(()=>[r("div",Q,[e(f,{style:{width:"100%"},modelValue:l.value.name,"onUpdate:modelValue":o[0]||(o[0]=s=>l.value.name=s)},null,8,["modelValue"]),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:V,type:"primary"},{default:a(()=>[i("获取")]),_:1})])]),_:1}),e(g,{label:"第几集开始"},{default:a(()=>[r("div",A,[e(f,{modelValue:l.value.start,"onUpdate:modelValue":o[1]||(o[1]=s=>l.value.start=s)},null,8,["modelValue"]),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:k,type:"primary"},{default:a(()=>[i("设置")]),_:1}),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:T,type:"primary"},{default:a(()=>[i("测试按钮")]),_:1})])]),_:1}),e(g,{label:"下载保存地址"},{default:a(()=>[r("div",G,[e(f,{modelValue:l.value.save,"onUpdate:modelValue":o[2]||(o[2]=s=>l.value.save=s)},null,8,["modelValue"]),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:C,type:"primary"},{default:a(()=>[i("下载")]),_:1}),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:I,type:"primary"},{default:a(()=>[i("查看进度")]),_:1})])]),_:1}),e(q,{ref_key:"table",ref:_,data:m.value,style:{width:"100%"}},{default:a(()=>[e(y,{type:"selection",width:"55"}),e(y,{label:"title",prop:"title"}),e(y,{label:"url",prop:"url"})]),_:1},8,["data"]),e(B,{fullscreen:!0,modelValue:p.value,"onUpdate:modelValue":o[3]||(o[3]=s=>p.value=s),title:"Tips",width:"30%"},{default:a(()=>[r("div",H,[(w(!0),b(N,null,U(v.value,s=>(w(),b("div",null,F(s),1))),256))])]),_:1},8,["modelValue"])]),_:1})}}},P=E(J,[["__scopeId","data-v-ef30d7a3"]]);export{P as default};
|
||||
import{a as h}from"./axios-4a70c6fc.js";import{_ as E,r as d,a as n,o as w,c as L,w as a,b as e,d as r,e as i,f as b,g as U,F as N,E as x,t as F,p as M,h as R}from"./index-f3388604.js";const j=c=>(M("data-v-ef30d7a3"),c=c(),R(),c),z=j(()=>r("div",{class:"card-header"},[r("span",null,"Video Download Test")],-1)),Q={style:{display:"flex",width:"100%"}},A={style:{display:"flex"}},G={style:{display:"flex"}},H={style:{width:"100%",height:"100%","overflow-y":"auto"}},J={__name:"downloadTest",setup(c){const p=d(!1),l=d({name:"https://v.qq.com/x/cover/mzc002007vp35qj.html",start:1,save:localStorage.getItem("save")}),m=d([]),_=d();function V(){h.get("/getQqList",{params:{url:l.value.name}}).then(t=>{m.value=t.data})}function k(){_.value.clearSelection();for(let t=l.value.start-1;t<m.value.length;t++)console.log(t),_.value.toggleRowSelection(m.value[t],void 0)}const v=d([]);async function C(){let t=_.value.getSelectionRows();if(t.length===0){x({showClose:!0,message:"请选择要下载的剧集",type:"error"});return}if(!l.value.save){x({showClose:!0,message:"请填写下载位置",type:"error"});return}p.value=!0,localStorage.setItem("save",l.value.save);for(let o of t)await h.get("/startDown",{params:{...o,save:l.value.save+"/"+o.title.split(" ")[0]}});x({showClose:!0,message:"添加完成",type:"success"})}const S=new EventSource("/msg");S.onmessage=t=>{v.value.length>200&&v.value.splice(200),v.value.unshift(t.data)};function I(){p.value=!0}function T(){h.get("/test",{params:{url:l.value.name}}).then(t=>{console.log(t.data)})}return(t,o)=>{const f=n("el-input"),u=n("el-button"),g=n("el-form-item"),y=n("el-table-column"),q=n("el-table"),B=n("el-dialog"),D=n("el-card");return w(),L(D,{class:"box-card"},{header:a(()=>[z]),default:a(()=>[e(g,{label:"视频地址"},{default:a(()=>[r("div",Q,[e(f,{style:{width:"100%"},modelValue:l.value.name,"onUpdate:modelValue":o[0]||(o[0]=s=>l.value.name=s)},null,8,["modelValue"]),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:V,type:"primary"},{default:a(()=>[i("获取")]),_:1})])]),_:1}),e(g,{label:"第几集开始"},{default:a(()=>[r("div",A,[e(f,{modelValue:l.value.start,"onUpdate:modelValue":o[1]||(o[1]=s=>l.value.start=s)},null,8,["modelValue"]),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:k,type:"primary"},{default:a(()=>[i("设置")]),_:1}),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:T,type:"primary"},{default:a(()=>[i("测试按钮")]),_:1})])]),_:1}),e(g,{label:"下载保存地址"},{default:a(()=>[r("div",G,[e(f,{modelValue:l.value.save,"onUpdate:modelValue":o[2]||(o[2]=s=>l.value.save=s)},null,8,["modelValue"]),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:C,type:"primary"},{default:a(()=>[i("下载")]),_:1}),e(u,{style:{"flex-shrink":"0",margin:"0 10px"},onClick:I,type:"primary"},{default:a(()=>[i("查看进度")]),_:1})])]),_:1}),e(q,{ref_key:"table",ref:_,data:m.value,style:{width:"100%"}},{default:a(()=>[e(y,{type:"selection",width:"55"}),e(y,{label:"title",prop:"title"}),e(y,{label:"url",prop:"url"})]),_:1},8,["data"]),e(B,{fullscreen:!0,modelValue:p.value,"onUpdate:modelValue":o[3]||(o[3]=s=>p.value=s),title:"Tips",width:"30%"},{default:a(()=>[r("div",H,[(w(!0),b(N,null,U(v.value,s=>(w(),b("div",null,F(s),1))),256))])]),_:1},8,["modelValue"])]),_:1})}}},P=E(J,[["__scopeId","data-v-ef30d7a3"]]);export{P as default};
|
@ -1 +1 @@
|
||||
import{a as i}from"./axios-4a70c6fc.js";import{_ as f,r as m,a as o,o as v,c as x,w as s,d as _,b as l,e as I,i as h,p as g,h as M}from"./index-105f30a6.js";const T=e=>(g("data-v-215ae4a3"),e=e(),M(),e),V={class:"card-header"},b=T(()=>_("span",null,"MediaInfo Test",-1)),B={__name:"getMediaInfoTest",setup(e){const a=m("");function c(){i.get("/getMediaInfo",{params:{filePath:a.value}}).then(n=>{h.alert(n.data.data)})}return(n,t)=>{const p=o("el-button"),r=o("el-input"),u=o("el-card");return v(),x(u,{class:"box-card"},{header:s(()=>[_("div",V,[b,l(p,{onClick:t[0]||(t[0]=d=>c()),class:"button",text:""},{default:s(()=>[I("Test")]),_:1})])]),default:s(()=>[l(r,{modelValue:a.value,"onUpdate:modelValue":t[1]||(t[1]=d=>a.value=d),placeholder:"视频文件绝对路径"},null,8,["modelValue"])]),_:1})}}},C=f(B,[["__scopeId","data-v-215ae4a3"]]);export{C as default};
|
||||
import{a as i}from"./axios-4a70c6fc.js";import{_ as f,r as m,a as o,o as v,c as x,w as s,d as _,b as l,e as I,i as h,p as g,h as M}from"./index-f3388604.js";const T=e=>(g("data-v-215ae4a3"),e=e(),M(),e),V={class:"card-header"},b=T(()=>_("span",null,"MediaInfo Test",-1)),B={__name:"getMediaInfoTest",setup(e){const a=m("");function c(){i.get("/getMediaInfo",{params:{filePath:a.value}}).then(n=>{h.alert(n.data.data)})}return(n,t)=>{const p=o("el-button"),r=o("el-input"),u=o("el-card");return v(),x(u,{class:"box-card"},{header:s(()=>[_("div",V,[b,l(p,{onClick:t[0]||(t[0]=d=>c()),class:"button",text:""},{default:s(()=>[I("Test")]),_:1})])]),default:s(()=>[l(r,{modelValue:a.value,"onUpdate:modelValue":t[1]||(t[1]=d=>a.value=d),placeholder:"视频文件绝对路径"},null,8,["modelValue"])]),_:1})}}},C=f(B,[["__scopeId","data-v-215ae4a3"]]);export{C as default};
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{a as t,o as r,c as v,w as n,b as e,u,j as w,e as l,k as b,v as g,l as k,m as y,r as p,f as x,F as B,d as h,_ as I}from"./index-105f30a6.js";const C={__name:"leftMenu",setup(f){return(d,m)=>{const _=t("el-icon"),o=t("el-menu-item"),a=t("el-menu-item-group"),s=t("el-sub-menu"),c=t("el-menu"),i=t("el-scrollbar");return r(),v(i,null,{default:n(()=>[e(c,{router:!0},{default:n(()=>[e(s,{index:"1"},{title:n(()=>[e(_,null,{default:n(()=>[e(u(w))]),_:1}),l("功能测试")]),default:n(()=>[e(a,null,{title:n(()=>[l("测试模块")]),default:n(()=>[e(o,{index:"/medaInfoTest"},{default:n(()=>[e(_,null,{default:n(()=>[e(u(b))]),_:1}),l("MediaInfo")]),_:1}),e(o,{index:"1"},{default:n(()=>[e(_,null,{default:n(()=>[e(u(g))]),_:1}),l("图像截取")]),_:1}),e(o,{index:"/downloadTest",to:""},{default:n(()=>[e(_,null,{default:n(()=>[e(u(k))]),_:1}),l("视频下载")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}},M=h("h3",{style:{width:"180px"}},"WEB-DL发布工具",-1),N=h("div",{class:"h-6"},null,-1),T=y({__name:"headerMenu",setup(f){const d=p("1");p("1");const m=(_,o)=>{console.log(_,o)};return(_,o)=>{const a=t("el-menu-item"),s=t("el-sub-menu"),c=t("el-avatar"),i=t("el-menu");return r(),x(B,null,[e(i,{"default-active":d.value,class:"el-menu-demo",mode:"horizontal",onSelect:m},{default:n(()=>[M,e(a,{index:"1"},{default:n(()=>[l("首页")]),_:1}),e(s,{index:"2"},{title:n(()=>[l("设置")]),default:n(()=>[e(a,{index:"2-1"},{default:n(()=>[l("item one")]),_:1})]),_:1}),e(c,{style:{position:"absolute",right:"0"},size:50,src:"https://www.konfan.cn/img/favicon.png"})]),_:1},8,["default-active"]),N],64)}}});const V={class:"common-layout"},$={__name:"index",setup(f){return(d,m)=>{const _=t("el-header"),o=t("el-aside"),a=t("router-view"),s=t("el-main"),c=t("el-container");return r(),x("div",V,[e(c,null,{default:n(()=>[e(_,null,{default:n(()=>[e(T)]),_:1}),e(c,null,{default:n(()=>[e(o,{width:"200px"},{default:n(()=>[e(C)]),_:1}),e(s,null,{default:n(()=>[e(a)]),_:1})]),_:1})]),_:1})])}}},E=I($,[["__scopeId","data-v-10e397ef"]]);export{E as default};
|
||||
import{a as t,o as r,c as v,w as n,b as e,u,j as w,e as l,k as b,v as g,l as k,m as y,r as p,f as x,F as B,d as h,_ as I}from"./index-f3388604.js";const C={__name:"leftMenu",setup(f){return(d,m)=>{const _=t("el-icon"),o=t("el-menu-item"),a=t("el-menu-item-group"),s=t("el-sub-menu"),c=t("el-menu"),i=t("el-scrollbar");return r(),v(i,null,{default:n(()=>[e(c,{router:!0},{default:n(()=>[e(s,{index:"1"},{title:n(()=>[e(_,null,{default:n(()=>[e(u(w))]),_:1}),l("功能测试")]),default:n(()=>[e(a,null,{title:n(()=>[l("测试模块")]),default:n(()=>[e(o,{index:"/medaInfoTest"},{default:n(()=>[e(_,null,{default:n(()=>[e(u(b))]),_:1}),l("MediaInfo")]),_:1}),e(o,{index:"1"},{default:n(()=>[e(_,null,{default:n(()=>[e(u(g))]),_:1}),l("图像截取")]),_:1}),e(o,{index:"/downloadTest",to:""},{default:n(()=>[e(_,null,{default:n(()=>[e(u(k))]),_:1}),l("视频下载")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}},M=h("h3",{style:{width:"180px"}},"WEB-DL发布工具",-1),N=h("div",{class:"h-6"},null,-1),T=y({__name:"headerMenu",setup(f){const d=p("1");p("1");const m=(_,o)=>{console.log(_,o)};return(_,o)=>{const a=t("el-menu-item"),s=t("el-sub-menu"),c=t("el-avatar"),i=t("el-menu");return r(),x(B,null,[e(i,{"default-active":d.value,class:"el-menu-demo",mode:"horizontal",onSelect:m},{default:n(()=>[M,e(a,{index:"1"},{default:n(()=>[l("首页")]),_:1}),e(s,{index:"2"},{title:n(()=>[l("设置")]),default:n(()=>[e(a,{index:"2-1"},{default:n(()=>[l("item one")]),_:1})]),_:1}),e(c,{style:{position:"absolute",right:"0"},size:50,src:"https://www.konfan.cn/img/favicon.png"})]),_:1},8,["default-active"]),N],64)}}});const V={class:"common-layout"},$={__name:"index",setup(f){return(d,m)=>{const _=t("el-header"),o=t("el-aside"),a=t("router-view"),s=t("el-main"),c=t("el-container");return r(),x("div",V,[e(c,null,{default:n(()=>[e(_,null,{default:n(()=>[e(T)]),_:1}),e(c,null,{default:n(()=>[e(o,{width:"200px"},{default:n(()=>[e(C)]),_:1}),e(s,null,{default:n(()=>[e(a)]),_:1})]),_:1})]),_:1})])}}},E=I($,[["__scopeId","data-v-10e397ef"]]);export{E as default};
|
File diff suppressed because one or more lines are too long
4
view/dist/index.html
vendored
4
view/dist/index.html
vendored
@ -5,8 +5,8 @@
|
||||
<link rel="icon" type="image/svg+xml" href="./vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite + Vue</title>
|
||||
<script type="module" crossorigin src="./assets/index-105f30a6.js"></script>
|
||||
<link rel="stylesheet" href="./assets/index-44d7f76c.css">
|
||||
<script type="module" crossorigin src="./assets/index-f3388604.js"></script>
|
||||
<link rel="stylesheet" href="./assets/index-6ef103ac.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
8
view/src/api/Video.js
Normal file
8
view/src/api/Video.js
Normal file
@ -0,0 +1,8 @@
|
||||
import { base } from "./base";
|
||||
export async function getVideoInfo(name){
|
||||
return await base.get("/videoInfo/search",{
|
||||
params:{
|
||||
name
|
||||
}
|
||||
})
|
||||
}
|
5
view/src/api/base.js
Normal file
5
view/src/api/base.js
Normal file
@ -0,0 +1,5 @@
|
||||
import axios from "axios";
|
||||
|
||||
export const base = axios.create({
|
||||
baseURL:"http://127.0.0.1:3050"
|
||||
})
|
@ -17,7 +17,16 @@ import {router} from "../router/index.js";
|
||||
<el-menu-item index="/downloadTest" to><el-icon><Download /></el-icon>视频下载</el-menu-item>
|
||||
</el-menu-item-group>
|
||||
</el-sub-menu>
|
||||
<el-sub-menu index="2">
|
||||
<template #title><el-icon><Check /></el-icon>订阅管理</template>
|
||||
<el-menu-item-group>
|
||||
<template #title>测试模块</template>
|
||||
<el-menu-item index="/addVideo"><el-icon><Edit /></el-icon>添加订阅</el-menu-item>
|
||||
<el-menu-item index="/downloadTest" to><el-icon><Download /></el-icon>订阅列表</el-menu-item>
|
||||
</el-menu-item-group>
|
||||
</el-sub-menu>
|
||||
</el-menu>
|
||||
|
||||
</el-scrollbar>
|
||||
|
||||
</template>
|
||||
|
38
view/src/page/addVideo.vue
Normal file
38
view/src/page/addVideo.vue
Normal file
@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form-item label="视频名称">
|
||||
<el-input v-model="form.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="播放地址">
|
||||
<el-input v-model="form.url" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">搜索</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import {getVideoInfo} from "../api/Video.js"
|
||||
|
||||
|
||||
const form = ref({
|
||||
name: "",
|
||||
url:""
|
||||
})
|
||||
async function onSubmit(){
|
||||
await getVideoInfo(form.value.name)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.form {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&>span {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -14,6 +14,10 @@ const routes = [
|
||||
path: "medaInfoTest",
|
||||
name: "medaInfoTest",
|
||||
component: () => import("../page/test/getMediaInfoTest.vue")
|
||||
},
|
||||
{
|
||||
path:"addVideo",
|
||||
component: ()=>import("../page/addVideo.vue")
|
||||
}
|
||||
],
|
||||
component: () => import("../page/index.vue"),
|
||||
|
Loading…
Reference in New Issue
Block a user