mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-11-25 05:11:51 +08:00
get video url
This commit is contained in:
@@ -13,7 +13,9 @@
|
||||
},
|
||||
"main": "background.js",
|
||||
"dependencies": {
|
||||
"axios": "^0.19.0",
|
||||
"core-js": "^2.6.5",
|
||||
"modern-normalize": "^0.5.0",
|
||||
"vue": "^2.6.10",
|
||||
"vue-router": "^3.0.3",
|
||||
"vuex": "^3.0.1"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div id="app">
|
||||
<div id="nav">
|
||||
<router-link to="/">Home</router-link> |
|
||||
<router-link to="/about">About</router-link>
|
||||
<router-link to="/search">search</router-link>
|
||||
</div>
|
||||
<router-view/>
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,7 @@ import { app, protocol, BrowserWindow } from 'electron'
|
||||
import {
|
||||
createProtocol
|
||||
} from 'vue-cli-plugin-electron-builder/lib'
|
||||
|
||||
const isDevelopment = process.env.NODE_ENV !== 'production'
|
||||
|
||||
// Keep a global reference of the window object, if you don't, the window will
|
||||
@@ -19,6 +20,7 @@ function createWindow () {
|
||||
width: 1024,
|
||||
height: 800,
|
||||
webPreferences: {
|
||||
webSecurity: false,
|
||||
nodeIntegration: true
|
||||
}
|
||||
})
|
||||
|
||||
@@ -2,6 +2,7 @@ import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
// import 'modern-normalize'
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ export default new Router({
|
||||
component: Home
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'about',
|
||||
path: '/search',
|
||||
name: 'search',
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
|
||||
component: () => import(/* webpackChunkName: "about" */ './views/Search.vue')
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
35
src/util/util.video.js
Normal file
35
src/util/util.video.js
Normal file
@@ -0,0 +1,35 @@
|
||||
// import Axios from "axios"
|
||||
import axios from 'axios'
|
||||
const video = {
|
||||
url: 'http://www.666zy.com/',
|
||||
init () {
|
||||
console.log('init')
|
||||
this.post(this.url, '冰雪奇缘')
|
||||
},
|
||||
getList () {},
|
||||
post (url, txt) {
|
||||
const t = encodeURI(txt)
|
||||
const d = `wd=${t}&submit=search`
|
||||
axios({
|
||||
url: url,
|
||||
method: 'post',
|
||||
params: { m: 'vod-search' },
|
||||
data: d
|
||||
}).then(res => {
|
||||
this.parser(res.data)
|
||||
})
|
||||
},
|
||||
parser (txt) {
|
||||
const parser = new DOMParser()
|
||||
const html = parser.parseFromString(txt, 'text/html')
|
||||
console.log(html)
|
||||
const list = html.querySelectorAll('.xing_vb4 a')
|
||||
console.log(list)
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
console.log(i, list[i].innerHTML, 'innerHTML')
|
||||
console.log(i, list[i].getAttribute('href'), 'href')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default video
|
||||
@@ -1,5 +0,0 @@
|
||||
<template>
|
||||
<div class="about">
|
||||
<h1>This is an about page</h1>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,18 +1,8 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<img alt="Vue logo" src="../assets/logo.png">
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
</div>
|
||||
<div class="home">home</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// @ is an alias to /src
|
||||
import HelloWorld from '@/components/HelloWorld.vue'
|
||||
|
||||
export default {
|
||||
name: 'home',
|
||||
components: {
|
||||
HelloWorld
|
||||
}
|
||||
name: 'home'
|
||||
}
|
||||
</script>
|
||||
|
||||
13
src/views/Search.vue
Normal file
13
src/views/Search.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div class="search">search</div>
|
||||
</template>
|
||||
<script>
|
||||
import video from '@/util/util.video'
|
||||
export default {
|
||||
name: 'search',
|
||||
methods: {},
|
||||
created () {
|
||||
video.init()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
32
yarn.lock
32
yarn.lock
@@ -1613,6 +1613,14 @@ aws4@^1.8.0:
|
||||
resolved "https://registry.npm.taobao.org/aws4/download/aws4-1.9.0.tgz?cache=0&sync_timestamp=1574807580911&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faws4%2Fdownload%2Faws4-1.9.0.tgz#24390e6ad61386b0a747265754d2a17219de862c"
|
||||
integrity sha1-JDkOatYThrCnRyZXVNKhchnehiw=
|
||||
|
||||
axios@^0.19.0:
|
||||
version "0.19.0"
|
||||
resolved "https://registry.npm.taobao.org/axios/download/axios-0.19.0.tgz#8e09bff3d9122e133f7b8101c8fbdd00ed3d2ab8"
|
||||
integrity sha1-jgm/89kSLhM/e4EByPvdAO09Krg=
|
||||
dependencies:
|
||||
follow-redirects "1.5.10"
|
||||
is-buffer "^2.0.2"
|
||||
|
||||
babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
|
||||
version "6.26.0"
|
||||
resolved "https://registry.npm.taobao.org/babel-code-frame/download/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
|
||||
@@ -3017,6 +3025,13 @@ debug@2.6.9, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@=3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
||||
integrity sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6:
|
||||
version "3.2.6"
|
||||
resolved "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
|
||||
@@ -4288,6 +4303,13 @@ flush-write-stream@^1.0.0:
|
||||
inherits "^2.0.3"
|
||||
readable-stream "^2.3.6"
|
||||
|
||||
follow-redirects@1.5.10:
|
||||
version "1.5.10"
|
||||
resolved "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a"
|
||||
integrity sha1-e3qfmuov3/NnhqlP9kPtB/T/Xio=
|
||||
dependencies:
|
||||
debug "=3.1.0"
|
||||
|
||||
follow-redirects@^1.0.0:
|
||||
version "1.9.0"
|
||||
resolved "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.9.0.tgz#8d5bcdc65b7108fe1508649c79c12d732dcedb4f"
|
||||
@@ -5248,6 +5270,11 @@ is-buffer@^1.1.5:
|
||||
resolved "https://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
|
||||
integrity sha1-76ouqdqg16suoTqXsritUf776L4=
|
||||
|
||||
is-buffer@^2.0.2:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.npm.taobao.org/is-buffer/download/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623"
|
||||
integrity sha1-PlcvI8hBGlz9lVfISeNmXgspBiM=
|
||||
|
||||
is-callable@^1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.npm.taobao.org/is-callable/download/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75"
|
||||
@@ -6269,6 +6296,11 @@ mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1:
|
||||
dependencies:
|
||||
minimist "0.0.8"
|
||||
|
||||
modern-normalize@^0.5.0:
|
||||
version "0.5.0"
|
||||
resolved "https://registry.npm.taobao.org/modern-normalize/download/modern-normalize-0.5.0.tgz#7f75bb7319c6ae708d716658dc8d9c9760274887"
|
||||
integrity sha1-f3W7cxnGrnCNcWZY3I2cl2AnSIc=
|
||||
|
||||
move-concurrently@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
|
||||
|
||||
Reference in New Issue
Block a user