🛸 新增麻花资源网和135资源网

This commit is contained in:
hunlongyu
2020-05-09 10:11:55 +08:00
parent 7d94cbd114
commit aa64c4c452
4 changed files with 412 additions and 48 deletions

View File

@@ -131,7 +131,7 @@
}
}
.detail{
color: var(--d-fc-1);
color: var(--d-fc-1) !important;
background-color:var(--d-bgc-1);
box-shadow: var(--d-bsc-2);
.detail-content{

View File

@@ -378,6 +378,7 @@ export default {
})
},
listItemEvent (n) {
this.video.currentTime = 0
this.video.index = n
this.right.show = false
this.right.type = ''

View File

@@ -112,6 +112,139 @@ const sites = [
}
]
},
{
key: 'okzy',
name: 'OK资源网',
url: 'https://www.okzy.co',
new: 'https://www.okzy.co/?m=vod-index-pg-{page}.html',
view: 'https://www.okzy.co/?m=vod-type-id-{id}-pg-{page}.html',
search: 'https://www.okzy.co/index.php?m=vod-search-pg-{page}-wd-{keywords}.html',
type: 0,
tags: [
{
title: '最新',
id: 0,
children: []
},
{
title: '电影',
id: 1,
children: [
{
title: '动作片',
id: 5
},
{
title: '喜剧片',
id: 6
},
{
title: '爱情片',
id: 7
},
{
title: '科幻片',
id: 8
},
{
title: '恐怖片',
id: 9
},
{
title: '剧情片',
id: 10
},
{
title: '战争片',
id: 11
},
{
title: '纪录片',
id: 19
},
{
title: '微电影',
id: 20
},
{
title: '伦理片',
id: 21
}
]
},
{
title: '连续剧',
id: 2,
children: [
{
title: '国产剧',
id: 12
},
{
title: '香港剧',
id: 13
},
{
title: '韩国剧',
id: 14
},
{
title: '欧美剧',
id: 15
},
{
title: '台湾剧',
id: 16
},
{
title: '日本剧',
id: 17
},
{
title: '海外剧',
id: 18
}
]
},
{
title: '综艺片',
id: 3,
children: [
{
title: '内地综艺',
id: 26
},
{
title: '港台综艺',
id: 27
},
{
title: '日韩综艺',
id: 28
},
{
title: '欧美综艺',
id: 29
}
]
},
{
title: '动漫片',
id: 4,
children: []
},
{
title: '福利片',
id: 22,
children: []
},
{
title: '解说',
id: 33,
children: []
}
]
},
{
key: 'subo',
name: '速播资源站',
@@ -215,6 +348,152 @@ const sites = [
}
]
},
{
key: 'mahuazy',
name: '麻花资源',
url: 'http://www.mahuazy.com',
new: 'http://www.mahuazy.com/?m=vod-index-pg-{page}.html',
view: 'http://www.mahuazy.com/?m=vod-type-id-{id}-pg-{page}.html',
search: 'http://www.mahuazy.com/?m=vod-search-pg-{page}-wd-{keywords}.html',
type: 0,
tags: [
{
title: '最新',
id: 0,
children: []
},
{
title: '电影',
id: 1,
children: [
{
title: '动作片',
id: 5
},
{
title: '喜剧片',
id: 6
},
{
title: '爱情片',
id: 7
},
{
title: '科幻片',
id: 8
},
{
title: '恐怖片',
id: 9
},
{
title: '剧情片',
id: 10
},
{
title: '战争片',
id: 11
},
{
title: '纪录片',
id: 20
},
{
title: '伦理片',
id: 21
}
]
},
{
title: '连续剧',
id: 2,
children: [
{
title: '国产剧',
id: 12
},
{
title: '香港剧',
id: 13
},
{
title: '韩剧',
id: 14
},
{
title: '欧美剧',
id: 15
},
{
title: '香港剧',
id: 16
},
{
title: '泰剧',
id: 17
},
{
title: '日剧',
id: 18
}
]
},
{
title: '综艺',
id: 3,
children: []
},
{
title: '动漫',
id: 4,
children: []
},
{
title: '网络电影',
id: 30,
children: [
{
title: '爆笑喜剧',
id: 31
},
{
title: '火爆动作',
id: 32
},
{
title: '浪漫爱情',
id: 33
},
{
title: '热血青春',
id: 34
},
{
title: '奇幻历险',
id: 35
},
{
title: '暗黑悬疑',
id: 36
},
{
title: '剧情家庭',
id: 37
}
]
},
{
title: '解说',
id: 38,
children: []
},
{
title: '福利片',
id: 19,
children: []
}
]
},
{
key: 'zuixinzy',
name: '最新资源网',
@@ -1084,13 +1363,13 @@ const sites = [
]
},
{
key: 'okzy',
name: 'OK资源网',
url: 'https://www.okzy.co',
new: 'https://www.okzy.co/?m=vod-index-pg-{page}.html',
view: 'https://www.okzy.co/?m=vod-type-id-{id}-page-{page}.html',
search: 'https://www.okzy.co/index.php?m=vod-search-pg-{page}-wd-{keywords}.html',
type: 0,
key: '135zy',
name: '135资源网',
url: 'http://135zy0.com',
new: 'http://135zy0.com/?m=vod-index-pg-{page}.html',
view: 'http://135zy0.com/?m=vod-type-id-{id}-pg-{page}.html',
search: '',
type: 3,
tags: [
{
title: '最新',
@@ -1129,17 +1408,9 @@ const sites = [
title: '战争片',
id: 11
},
{
title: '纪录片',
id: 19
},
{
title: '微电影',
id: 20
},
{
title: '伦理片',
id: 21
id: 18
}
]
},
@@ -1156,7 +1427,7 @@ const sites = [
id: 13
},
{
title: '韩国剧',
title: '日本剧',
id: 14
},
{
@@ -1168,51 +1439,29 @@ const sites = [
id: 16
},
{
title: '日本剧',
title: '韩国剧',
id: 17
},
{
title: '海外剧',
id: 18
title: '泰剧',
id: 21
}
]
},
{
title: '综艺片',
title: '综艺',
id: 3,
children: [
{
title: '内地综艺',
id: 26
},
{
title: '港台综艺',
id: 27
},
{
title: '日韩综艺',
id: 28
},
{
title: '欧美综艺',
id: 29
}
]
children: []
},
{
title: '动漫片',
title: '动漫',
id: 4,
children: []
},
{
title: '福利片',
title: '纪录片',
id: 22,
children: []
},
{
title: '解说',
id: 33,
children: []
}
]
}

View File

@@ -30,6 +30,10 @@ const zy = {
const twoData = await this.film_get_type_two(data, key)
resolve(twoData)
}
if (type === 3) {
const threeData = await this.film_get_type_three(data, key)
resolve(threeData)
}
}).catch(err => {
reject(err)
})
@@ -128,6 +132,36 @@ const zy = {
}
})
},
film_get_type_three (txt, key) {
return new Promise((resolve, reject) => {
try {
const parser = new DOMParser()
const html = parser.parseFromString(txt, 'text/html')
const list = html.querySelectorAll('.xing_vb li')
const d = { list: [], total: 0, update: 0 }
const url = getSite(key).url
for (let i = 1; i < list.length - 1; i++) {
const info = {
site: key,
name: list[i].childNodes[1].innerText,
type: list[i].childNodes[2].innerText,
time: list[i].childNodes[3].innerText,
detail: url + list[i].childNodes[1].querySelector('a').getAttribute('href'),
index: 0
}
d.list.push(info)
}
d.update = parseInt(html.querySelectorAll('.xing_top_right li strong')[0].innerText)
let t = html.querySelector('.pages').innerText
t = t.split('条')[0]
t = t.split('共')[1]
d.total = parseInt(t)
resolve(d)
} catch (err) {
reject(err)
}
})
},
// 获取详情
detail_get (key, url) {
return new Promise((resolve, reject) => {
@@ -145,6 +179,10 @@ const zy = {
const twoData = await this.detail_get_type_two(res.data, key)
resolve(twoData)
}
if (type === 3) {
const threeData = await this.detail_get_type_three(res.data, key)
resolve(threeData)
}
}).catch(err => {
reject(err)
})
@@ -172,7 +210,7 @@ const zy = {
for (let i = 0; i < vodInfo.length; i++) {
const k = vodInfo[i].innerText
if (k.indexOf('剧情介绍') >= 0) {
data.desc = vodInfo[i].querySelector('.vodplayinfo').innerHTML
data.desc = vodInfo[i].querySelector('.vodplayinfo').innerText
}
}
const vodLi = html.querySelectorAll('.ibox .vodplayinfo li')
@@ -279,6 +317,51 @@ const zy = {
}
})
},
detail_get_type_three (txt, key) {
return new Promise((resolve, reject) => {
try {
const parser = new DOMParser()
const html = parser.parseFromString(txt, 'text/html')
const data = {
site: key,
name: '',
info: '',
desc: '',
m3u8_urls: [],
mp4_urls: []
}
const vodBox = html.querySelector('.vodBox')
data.info = vodBox.innerHTML
const title = html.querySelector('.vodh h2').innerText
const index = html.querySelector('.vodh span').innerText
data.name = title + index
const vodInfo = html.querySelectorAll('.playBox')
for (let i = 0; i < vodInfo.length; i++) {
const k = vodInfo[i].innerText
if (k.indexOf('剧情介绍') >= 0) {
data.desc = vodInfo[i].querySelector('.vodplayinfo').innerHTML
}
}
const vodLi = html.querySelectorAll('.ibox .vodplayinfo li')
const m3u8UrlArr = []
const mp4UrlArr = []
for (let i = 0; i < vodLi.length; i++) {
const j = vodLi[i].innerText
if (j.indexOf('.m3u8') >= 0) {
m3u8UrlArr.unshift(j)
}
if (j.indexOf('.mp4') >= 0) {
mp4UrlArr.unshift(j)
}
}
data.m3u8_urls = m3u8UrlArr
data.mp4_urls = mp4UrlArr
resolve(data)
} catch (err) {
reject(err)
}
})
},
// 搜索列表
search_get (key, keywords = '', page = 1) {
return new Promise((resolve, reject) => {
@@ -301,6 +384,10 @@ const zy = {
const oneData = await this.search_get_type_one(data, key)
resolve(oneData)
}
if (type === 3) {
const threeData = await this.search_get_type_three(data, key)
resolve(threeData)
}
}).catch(err => {
reject(err)
})
@@ -358,6 +445,33 @@ const zy = {
reject(err)
}
})
},
search_get_type_three (txt, key) {
return new Promise((resolve, reject) => {
try {
const parser = new DOMParser()
const html = parser.parseFromString(txt, 'text/html')
const list = html.querySelectorAll('.xing_vb li')
const d = { list: [], total: 0 }
const url = getSite(key).url
for (let i = 1; i < list.length - 1; i++) {
const info = {
site: key,
name: list[i].childNodes[1].innerText,
type: list[i].childNodes[2].innerText,
time: list[i].childNodes[3].innerText,
detail: url + list[i].childNodes[1].querySelector('a').getAttribute('href'),
index: 0
}
d.list.push(info)
}
const t = html.querySelector('.nvc dd').innerText.replace(/[^\d]/g, '')
d.total = parseInt(t)
resolve(d)
} catch (err) {
reject(err)
}
})
}
}