code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json
import time
import base64

class Spider(Spider):  # 元类 默认的元类 type
	def getName(self):
		return "哔哩"
	def init(self,extend=""):
		print("============{0}============".format(extend))
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
"儿童早教": "儿童早教",
"儿童启蒙故事": "儿童启蒙故事",
"儿童英语启蒙": "儿童英语启蒙",
"儿童歌曲": "儿童歌曲",
"儿童绘画": "儿童绘画",
"睡前故事": "睡前故事",
"儿童动画": "儿童动画",
"儿童音乐": "儿童音乐",
"儿童安全教育": "儿童安全教育",
"贝瓦儿歌": "贝瓦儿歌",
"悟空识字": "悟空识字",
"儿童": "儿童",
"宝宝巴士": "宝宝巴士",
"少儿": "少儿",
"学而思": "学而思",
"小学": "小学",
"初中": "初中",
"高中": "高中",
"教育": "教育"

		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name':k,
				'type_id':cateManual[k]
			})
		result['class'] = classes
		if(filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {
			'list':[]
		}
		return result
	cookies = ''
	def getCookie(self):
		rsp = self.fetch("https://www.bilibili.com/")
		self.cookies = rsp.cookies
		return rsp.cookies
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword={0}&duration=4&page={1}'.format(tid,pg)
		if len(self.cookies) <= 0:
			self.getCookie()
		rsp = self.fetch(url,cookies=self.cookies)
		content = rsp.text
		jo = json.loads(content)
		if jo['code'] != 0:
			rspRetry = self.fetch(url,cookies=self.getCookie())
			content = rspRetry.text
		jo = json.loads(content)
		videos = []
		vodList = jo['data']['result']
		for vod in vodList:
			aid = str(vod['aid']).strip()
			title = vod['title'].strip().replace("","").replace("","")
			img = 'https:' + vod['pic'].strip()
			remark = str(vod['duration']).strip()
			videos.append({
				"vod_id":aid,
				"vod_name":title,
				"vod_pic":img,
				"vod_remarks":remark
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = 9999
		result['limit'] = 90
		result['total'] = 999999
		return result
	def cleanSpace(self,str):
		return str.replace('\n','').replace('\t','').replace('\r','').replace(' ','')
	def detailContent(self,array):
		aid = array[0]
		url = "https://api.bilibili.com/x/web-interface/view?aid={0}".format(aid)

		rsp = self.fetch(url,headers=self.header)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		title = jo['title'].replace("","").replace("","")
		pic = jo['pic']
		desc = jo['desc']
		typeName = jo['tname']
		vod = {
			"vod_id":aid,
			"vod_name":title,
			"vod_pic":pic,
			"type_name":typeName,
			"vod_year":"",
			"vod_area":"",
			"vod_remarks":"",
			"vod_actor":"",
			"vod_director":"",
			"vod_content":desc
		}
		ja = jo['pages']
		playUrl = ''
		for tmpJo in ja:
			cid = tmpJo['cid']
			part = tmpJo['part']
			playUrl = playUrl + '{0}${1}_{2}#'.format(part,aid,cid)

		vod['vod_play_from'] = 'B站'
		vod['vod_play_url'] = playUrl

		result = {
			'list':[
				vod
			]
		}
		return result
	def searchContent(self,key,quick):
		result = {
			'list':[]
		}
		return result
	def playerContent(self,flag,id,vipFlags):
		# https://www.555dianying.cc/vodplay/static/js/playerconfig.js
		result = {}

		ids = id.split("_")
		url = 'https://api.bilibili.com:443/x/player/playurl?avid={0}&cid=%20%20{1}&qn=112'.format(ids[0],ids[1])
		rsp = self.fetch(url)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		ja = jo['durl']

		maxSize = -1
		position = -1
		for i in range(len(ja)):
			tmpJo = ja[i]
			if maxSize < int(tmpJo['size']):
				maxSize = int(tmpJo['size'])
				position = i

		url = ''
		if len(ja) > 0:
			if position == -1:
				position = 0
			url = ja[position]['url']

		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = {
			"Referer":"https://www.bilibili.com",
			"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
		}
		result["contentType"] = 'video/x-flv'
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json
import time
import base64

class Spider(Spider):  # 元类 默认的元类 type
	def getName(self):
		return "哔哩"
	def init(self,extend=""):
		print("============{0}============".format(extend))
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
"7年级语文": "7年级语文",
"7年级数学": "7年级数学",
"7年级英语": "7年级英语",
"7年级物理": "7年级物理",
"7年级化学": "7年级化学",
"7年级生物": "7年级生物",
"7年级政治": "7年级政治",
"7年级历史": "7年级历史",
"7年级地理": "7年级地理",
"8年级语文": "8年级语文",
"8年级数学": "8年级数学",
"8年级英语": "8年级英语",
"8年级物理": "8年级物理",
"8年级化学": "8年级化学",
"8年级生物": "8年级生物",
"8年级政治": "8年级政治",
"8年级历史": "8年级历史",
"8年级地理": "8年级地理",
"9年级语文": "9年级语文",
"9年级数学": "9年级数学",
"9年级英语": "9年级英语",
"9年级物理": "9年级物理",
"9年级化学": "9年级化学",
"9年级生物": "9年级生物",
"9年级政治": "9年级政治",
"9年级历史": "9年级历史",
"9年级地理": "9年级地理"
		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name':k,
				'type_id':cateManual[k]
			})
		result['class'] = classes
		if(filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {
			'list':[]
		}
		return result
	cookies = ''
	def getCookie(self):
		rsp = self.fetch("https://www.bilibili.com/")
		self.cookies = rsp.cookies
		return rsp.cookies
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword={0}&duration=4&page={1}'.format(tid,pg)
		if len(self.cookies) <= 0:
			self.getCookie()
		rsp = self.fetch(url,cookies=self.cookies)
		content = rsp.text
		jo = json.loads(content)
		if jo['code'] != 0:
			rspRetry = self.fetch(url,cookies=self.getCookie())
			content = rspRetry.text
		jo = json.loads(content)
		videos = []
		vodList = jo['data']['result']
		for vod in vodList:
			aid = str(vod['aid']).strip()
			title = vod['title'].strip().replace("","").replace("","")
			img = 'https:' + vod['pic'].strip()
			remark = str(vod['duration']).strip()
			videos.append({
				"vod_id":aid,
				"vod_name":title,
				"vod_pic":img,
				"vod_remarks":remark
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = 9999
		result['limit'] = 90
		result['total'] = 999999
		return result
	def cleanSpace(self,str):
		return str.replace('\n','').replace('\t','').replace('\r','').replace(' ','')
	def detailContent(self,array):
		aid = array[0]
		url = "https://api.bilibili.com/x/web-interface/view?aid={0}".format(aid)

		rsp = self.fetch(url,headers=self.header)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		title = jo['title'].replace("","").replace("","")
		pic = jo['pic']
		desc = jo['desc']
		typeName = jo['tname']
		vod = {
			"vod_id":aid,
			"vod_name":title,
			"vod_pic":pic,
			"type_name":typeName,
			"vod_year":"",
			"vod_area":"",
			"vod_remarks":"",
			"vod_actor":"",
			"vod_director":"",
			"vod_content":desc
		}
		ja = jo['pages']
		playUrl = ''
		for tmpJo in ja:
			cid = tmpJo['cid']
			part = tmpJo['part']
			playUrl = playUrl + '{0}${1}_{2}#'.format(part,aid,cid)

		vod['vod_play_from'] = 'B站'
		vod['vod_play_url'] = playUrl

		result = {
			'list':[
				vod
			]
		}
		return result
	def searchContent(self,key,quick):
		result = {
			'list':[]
		}
		return result
	def playerContent(self,flag,id,vipFlags):
		# https://www.555dianying.cc/vodplay/static/js/playerconfig.js
		result = {}

		ids = id.split("_")
		url = 'https://api.bilibili.com:443/x/player/playurl?avid={0}&cid=%20%20{1}&qn=112'.format(ids[0],ids[1])
		rsp = self.fetch(url)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		ja = jo['durl']

		maxSize = -1
		position = -1
		for i in range(len(ja)):
			tmpJo = ja[i]
			if maxSize < int(tmpJo['size']):
				maxSize = int(tmpJo['size'])
				position = i

		url = ''
		if len(ja) > 0:
			if position == -1:
				position = 0
			url = ja[position]['url']

		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = {
			"Referer":"https://www.bilibili.com",
			"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
		}
		result["contentType"] = 'video/x-flv'
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]

license: unknown


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json
import time
import base64

class Spider(Spider):  # 元类 默认的元类 type
	def getName(self):
		return "哔哩"
	def init(self,extend=""):
		print("============{0}============".format(extend))
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
"高一语文": "高一语文",
"高一数学": "高一数学",
"高一英语": "高一英语",
"高一物理": "高一物理",
"高一化学": "高一化学",
"高一生物": "高一生物",
"高一政治": "高一政治",
"高一历史": "高一历史",
"高一地理": "高一地理",
"高二语文": "高二语文",
"高二数学": "高二数学",
"高二英语": "高二英语",
"高二物理": "高二物理",
"高二化学": "高二化学",
"高二生物": "高二生物",
"高二政治": "高二政治",
"高二历史": "高二历史",
"高二地理": "高二地理",
"高三语文": "高三语文",
"高三数学": "高三数学",
"高三英语": "高三英语",
"高三物理": "高三物理",
"高三化学": "高三化学",
"高三生物": "高三生物",
"高三政治": "高三政治",
"高三历史": "高三历史",
"高三地理": "高三地理",
"高中信息技术": "高中信息技术"

		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name':k,
				'type_id':cateManual[k]
			})
		result['class'] = classes
		if(filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {
			'list':[]
		}
		return result
	cookies = ''
	def getCookie(self):
		rsp = self.fetch("https://www.bilibili.com/")
		self.cookies = rsp.cookies
		return rsp.cookies
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword={0}&duration=4&page={1}'.format(tid,pg)
		if len(self.cookies) <= 0:
			self.getCookie()
		rsp = self.fetch(url,cookies=self.cookies)
		content = rsp.text
		jo = json.loads(content)
		if jo['code'] != 0:
			rspRetry = self.fetch(url,cookies=self.getCookie())
			content = rspRetry.text
		jo = json.loads(content)
		videos = []
		vodList = jo['data']['result']
		for vod in vodList:
			aid = str(vod['aid']).strip()
			title = vod['title'].strip().replace("","").replace("","")
			img = 'https:' + vod['pic'].strip()
			remark = str(vod['duration']).strip()
			videos.append({
				"vod_id":aid,
				"vod_name":title,
				"vod_pic":img,
				"vod_remarks":remark
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = 9999
		result['limit'] = 90
		result['total'] = 999999
		return result
	def cleanSpace(self,str):
		return str.replace('\n','').replace('\t','').replace('\r','').replace(' ','')
	def detailContent(self,array):
		aid = array[0]
		url = "https://api.bilibili.com/x/web-interface/view?aid={0}".format(aid)

		rsp = self.fetch(url,headers=self.header)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		title = jo['title'].replace("","").replace("","")
		pic = jo['pic']
		desc = jo['desc']
		typeName = jo['tname']
		vod = {
			"vod_id":aid,
			"vod_name":title,
			"vod_pic":pic,
			"type_name":typeName,
			"vod_year":"",
			"vod_area":"",
			"vod_remarks":"",
			"vod_actor":"",
			"vod_director":"",
			"vod_content":desc
		}
		ja = jo['pages']
		playUrl = ''
		for tmpJo in ja:
			cid = tmpJo['cid']
			part = tmpJo['part']
			playUrl = playUrl + '{0}${1}_{2}#'.format(part,aid,cid)

		vod['vod_play_from'] = 'B站'
		vod['vod_play_url'] = playUrl

		result = {
			'list':[
				vod
			]
		}
		return result
	def searchContent(self,key,quick):
		result = {
			'list':[]
		}
		return result
	def playerContent(self,flag,id,vipFlags):
		# https://www.555dianying.cc/vodplay/static/js/playerconfig.js
		result = {}

		ids = id.split("_")
		url = 'https://api.bilibili.com:443/x/player/playurl?avid={0}&cid=%20%20{1}&qn=112'.format(ids[0],ids[1])
		rsp = self.fetch(url)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		ja = jo['durl']

		maxSize = -1
		position = -1
		for i in range(len(ja)):
			tmpJo = ja[i]
			if maxSize < int(tmpJo['size']):
				maxSize = int(tmpJo['size'])
				position = i

		url = ''
		if len(ja) > 0:
			if position == -1:
				position = 0
			url = ja[position]['url']

		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = {
			"Referer":"https://www.bilibili.com",
			"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
		}
		result["contentType"] = 'video/x-flv'
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json
import time
import base64

class Spider(Spider):  # 元类 默认的元类 type
	def getName(self):
		return "哔哩"
	def init(self,extend=""):
		print("============{0}============".format(extend))
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
"1年级语文": "1年级语文",
"1年级数学": "1年级数学",
"1年级英语": "1年级英语",
"2年级语文": "2年级语文",
"2年级数学": "2年级数学",
"2年级英语": "2年级英语",
"3年级语文": "3年级语文",
"3年级数学": "3年级数学",
"3年级英语": "3年级英语",
"4年级语文": "4年级语文",
"4年级数学": "4年级数学",
"4年级英语": "4年级英语",
"5年级语文": "5年级语文",
"5年级数学": "5年级数学",
"5年级英语": "5年级英语",
"6年级语文": "6年级语文",
"6年级数学": "6年级数学",
"6年级英语": "6年级英语"

		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name':k,
				'type_id':cateManual[k]
			})
		result['class'] = classes
		if(filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {
			'list':[]
		}
		return result
	cookies = ''
	def getCookie(self):
		rsp = self.fetch("https://www.bilibili.com/")
		self.cookies = rsp.cookies
		return rsp.cookies
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword={0}&duration=4&page={1}'.format(tid,pg)
		if len(self.cookies) <= 0:
			self.getCookie()
		rsp = self.fetch(url,cookies=self.cookies)
		content = rsp.text
		jo = json.loads(content)
		if jo['code'] != 0:
			rspRetry = self.fetch(url,cookies=self.getCookie())
			content = rspRetry.text
		jo = json.loads(content)
		videos = []
		vodList = jo['data']['result']
		for vod in vodList:
			aid = str(vod['aid']).strip()
			title = vod['title'].strip().replace("","").replace("","")
			img = 'https:' + vod['pic'].strip()
			remark = str(vod['duration']).strip()
			videos.append({
				"vod_id":aid,
				"vod_name":title,
				"vod_pic":img,
				"vod_remarks":remark
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = 9999
		result['limit'] = 90
		result['total'] = 999999
		return result
	def cleanSpace(self,str):
		return str.replace('\n','').replace('\t','').replace('\r','').replace(' ','')
	def detailContent(self,array):
		aid = array[0]
		url = "https://api.bilibili.com/x/web-interface/view?aid={0}".format(aid)

		rsp = self.fetch(url,headers=self.header)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		title = jo['title'].replace("","").replace("","")
		pic = jo['pic']
		desc = jo['desc']
		typeName = jo['tname']
		vod = {
			"vod_id":aid,
			"vod_name":title,
			"vod_pic":pic,
			"type_name":typeName,
			"vod_year":"",
			"vod_area":"",
			"vod_remarks":"",
			"vod_actor":"",
			"vod_director":"",
			"vod_content":desc
		}
		ja = jo['pages']
		playUrl = ''
		for tmpJo in ja:
			cid = tmpJo['cid']
			part = tmpJo['part']
			playUrl = playUrl + '{0}${1}_{2}#'.format(part,aid,cid)

		vod['vod_play_from'] = 'B站'
		vod['vod_play_url'] = playUrl

		result = {
			'list':[
				vod
			]
		}
		return result
	def searchContent(self,key,quick):
		result = {
			'list':[]
		}
		return result
	def playerContent(self,flag,id,vipFlags):
		# https://www.555dianying.cc/vodplay/static/js/playerconfig.js
		result = {}

		ids = id.split("_")
		url = 'https://api.bilibili.com:443/x/player/playurl?avid={0}&cid=%20%20{1}&qn=112'.format(ids[0],ids[1])
		rsp = self.fetch(url)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		ja = jo['durl']

		maxSize = -1
		position = -1
		for i in range(len(ja)):
			tmpJo = ja[i]
			if maxSize < int(tmpJo['size']):
				maxSize = int(tmpJo['size'])
				position = i

		url = ''
		if len(ja) > 0:
			if position == -1:
				position = 0
			url = ja[position]['url']

		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = {
			"Referer":"https://www.bilibili.com",
			"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
		}
		result["contentType"] = 'video/x-flv'
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json
import time
import base64

class Spider(Spider):  # 元类 默认的元类 type
	def getName(self):
		return "哔哩"
	def init(self,extend=""):
		print("============{0}============".format(extend))
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
"小剧场": "小剧场",
"番剧": "番剧",
"国创": "国创",
"电影": "电影",
"综艺": "综艺",
"电视剧": "电视剧",
"纪录片": "纪录片"

		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name':k,
				'type_id':cateManual[k]
			})
		result['class'] = classes
		if(filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {
			'list':[]
		}
		return result
	cookies = ''
	def getCookie(self):
		rsp = self.fetch("https://www.bilibili.com/")
		self.cookies = rsp.cookies
		return rsp.cookies
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword={0}&duration=4&page={1}'.format(tid,pg)
		if len(self.cookies) <= 0:
			self.getCookie()
		rsp = self.fetch(url,cookies=self.cookies)
		content = rsp.text
		jo = json.loads(content)
		if jo['code'] != 0:
			rspRetry = self.fetch(url,cookies=self.getCookie())
			content = rspRetry.text
		jo = json.loads(content)
		videos = []
		vodList = jo['data']['result']
		for vod in vodList:
			aid = str(vod['aid']).strip()
			title = vod['title'].strip().replace("","").replace("","")
			img = 'https:' + vod['pic'].strip()
			remark = str(vod['duration']).strip()
			videos.append({
				"vod_id":aid,
				"vod_name":title,
				"vod_pic":img,
				"vod_remarks":remark
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = 9999
		result['limit'] = 90
		result['total'] = 999999
		return result
	def cleanSpace(self,str):
		return str.replace('\n','').replace('\t','').replace('\r','').replace(' ','')
	def detailContent(self,array):
		aid = array[0]
		url = "https://api.bilibili.com/x/web-interface/view?aid={0}".format(aid)

		rsp = self.fetch(url,headers=self.header)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		title = jo['title'].replace("","").replace("","")
		pic = jo['pic']
		desc = jo['desc']
		typeName = jo['tname']
		vod = {
			"vod_id":aid,
			"vod_name":title,
			"vod_pic":pic,
			"type_name":typeName,
			"vod_year":"",
			"vod_area":"",
			"vod_remarks":"",
			"vod_actor":"",
			"vod_director":"",
			"vod_content":desc
		}
		ja = jo['pages']
		playUrl = ''
		for tmpJo in ja:
			cid = tmpJo['cid']
			part = tmpJo['part']
			playUrl = playUrl + '{0}${1}_{2}#'.format(part,aid,cid)

		vod['vod_play_from'] = 'B站'
		vod['vod_play_url'] = playUrl

		result = {
			'list':[
				vod
			]
		}
		return result
	def searchContent(self,key,quick):
		result = {
			'list':[]
		}
		return result
	def playerContent(self,flag,id,vipFlags):
		# https://www.555dianying.cc/vodplay/static/js/playerconfig.js
		result = {}

		ids = id.split("_")
		url = 'https://api.bilibili.com:443/x/player/playurl?avid={0}&cid=%20%20{1}&qn=112'.format(ids[0],ids[1])
		rsp = self.fetch(url)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		ja = jo['durl']

		maxSize = -1
		position = -1
		for i in range(len(ja)):
			tmpJo = ja[i]
			if maxSize < int(tmpJo['size']):
				maxSize = int(tmpJo['size'])
				position = i

		url = ''
		if len(ja) > 0:
			if position == -1:
				position = 0
			url = ja[position]['url']

		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = {
			"Referer":"https://www.bilibili.com",
			"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
		}
		result["contentType"] = 'video/x-flv'
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json
from requests import session, utils
import os
import time
import base64

class Spider(Spider):  # 元类 默认的元类 type
	def getName(self):
		return "B站影视"
	def init(self,extend=""):
		print("============{0}============".format(extend))
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
			"番剧": "1",
			"国创": "4",
			"电影": "2",
			"综艺": "7",
			"电视剧": "5",
			"纪录片": "3"
		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name':k,
				'type_id':cateManual[k]
			})
		result['class'] = classes
		if(filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {
			'list':[]
		}
		return result
	cookies = ''
	def getCookie(self):
		#在cookies_str中填入会员或大会员cookie，以获得更好的体验
		cookies_str = "innersign=0; buvid3=606BE156-AE37-AEA8-7052-9DA0B21766E776404infoc; b_nut=1663302976; i-wanna-go-back=-1; b_ut=7; b_lsid=4106252F6_18344933A90; _uuid=586AAEB7-6B88-A691-F7AC-95C27E57F53C43036infoc; buvid4=B6FF1449-4361-1C76-DEFC-4AFCA1777B7E78304-022091612-PdJr0jKE6N5TamfAEX9uACD1RXvklspbNdlcIQEFLMu0d9wS3G3sdA%3D%3D; buvid_fp=2a9b54d5e06aa54293dc7544e000552d"
		cookies_dic = dict([co.strip().split('=') for co in cookies_str.split(';')])
		rsp = session()
		cookies_jar = utils.cookiejar_from_dict(cookies_dic)
		rsp.cookies = cookies_jar
		content = self.fetch("http://api.bilibili.com/x/web-interface/nav", cookies=rsp.cookies)
		res = json.loads(content.text)
		if res["code"] == 0:
			self.cookies = rsp.cookies
		else:
			rsp = self.fetch("https://www.bilibili.com/")
			self.cookies = rsp.cookies
		return rsp.cookies

	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'https://api.bilibili.com/pgc/season/index/result?order=2&season_status=-1&style_id=-1&sort=0&area=-1&pagesize=20&type=1&st={0}&season_type={0}&page={1}'.format(tid,pg)
		if len(self.cookies) <= 0:
			self.getCookie()
		rsp = self.fetch(url, cookies=self.cookies)
		content = rsp.text
		jo = json.loads(content)
		videos = []
		vodList = jo['data']['list']
		for vod in vodList:
			aid = str(vod['season_id']).strip()
			title = vod['title'].strip()
			img =  vod['cover'].strip()
			remark = vod['index_show'].strip()
			videos.append({
				"vod_id":aid,
				"vod_name":title,
				"vod_pic":img,
				"vod_remarks":remark
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = 9999
		result['limit'] = 90
		result['total'] = 999999
		return result
	def cleanSpace(self,str):
		return str.replace('\n','').replace('\t','').replace('\r','').replace(' ','')
	def detailContent(self,array):
		aid = array[0]
		url = "http://api.bilibili.com/pgc/view/web/season?season_id={0}".format(aid)
		rsp = self.fetch(url,headers=self.header)
		jRoot = json.loads(rsp.text)
		jo = jRoot['result']
		id = jo['season_id']
		title = jo['title']
		pic = jo['cover']
		areas = jo['areas'][0]['name']
		typeName = jo['share_sub_title']
		dec = jo['evaluate']
		remark = jo['new_ep']['desc']
		vod = {
			"vod_id":id,
			"vod_name":title,
			"vod_pic":pic,
			"type_name":typeName,
			"vod_year":"",
			"vod_area":areas,
			"vod_remarks":remark,
			"vod_actor":"",
			"vod_director":"",
			"vod_content":dec
		}
		ja = jo['episodes']
		playUrl = ''
		for tmpJo in ja:
			eid = tmpJo['id']
			cid = tmpJo['cid']
			part = tmpJo['title'].replace("#", "-")
			playUrl = playUrl + '{0}${1}_{2}#'.format(part, eid, cid)

		vod['vod_play_from'] = 'B站影视'
		vod['vod_play_url'] = playUrl

		result = {
			'list':[
				vod
			]
		}
		return result
	def searchContent(self,key,quick):
		url = 'https://api.bilibili.com/x/web-interface/search/type?search_type=media_bangumi&keyword={0}'.format(key)  # 番剧搜索
		if len(self.cookies) <= 0:
			self.getCookie()
		rsp = self.fetch(url, cookies=self.cookies)
		content = rsp.text
		jo = json.loads(content)
		rs = jo['data']
		if rs['numResults'] == 0:
			url = 'https://api.bilibili.com/x/web-interface/search/type?search_type=media_ft&keyword={0}'.format(key)  # 影视搜索
			rspRetry = self.fetch(url, cookies=self.cookies)
			content = rspRetry.text
		jo = json.loads(content)
		videos = []
		vodList = jo['data']['result']
		for vod in vodList:
			aid = str(vod['season_id']).strip()
			title = vod['title'].strip().replace("", "").replace("", "")
			img = vod['eps'][0]['cover'].strip()
			remark = vod['index_show']
			videos.append({
				"vod_id": aid,
				"vod_name": title,
				"vod_pic": img,
				"vod_remarks": remark
			})
		result = {
			'list': videos
		}
		return result

	def playerContent(self,flag,id,vipFlags):
		result = {}
		ids = id.split("_")
		header = {
			"Referer": "https://www.bilibili.com",
			"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
		}
		url = 'https://api.bilibili.com/pgc/player/web/playurl?qn=116&ep_id={0}&cid={1}'.format(ids[0],ids[1])
		if len(self.cookies) <= 0:
			self.getCookie()
		rsp = self.fetch(url,cookies=self.cookies,headers=header)
		jRoot = json.loads(rsp.text)
		if jRoot['message'] != 'success':
			print("需要大会员权限才能观看")
			return {}
		jo = jRoot['result']
		ja = jo['durl']
		maxSize = -1
		position = -1
		for i in range(len(ja)):
			tmpJo = ja[i]
			if maxSize < int(tmpJo['size']):
				maxSize = int(tmpJo['size'])
				position = i

		url = ''
		if len(ja) > 0:
			if position == -1:
				position = 0
			url = ja[position]['url']

		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = {
			"Referer":"https://www.bilibili.com",
			"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
		}
		result["contentType"] = 'video/x-flv'
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
# coding=utf-8
# !/usr/bin/python
import sys

sys.path.append('..')
from base.spider import Spider
import json
import requests
from requests import session, utils
import os
import time
import base64

class Spider(Spider):  # 元类 默认的元类 type
    def getName(self):
        return "哔哩"

    def init(self, extend=""):
        print("============{0}============".format(extend))
        pass

    def isVideoFormat(self, url):
        pass

    def manualVideoCheck(self):
        pass

    def homeContent(self, filter):
        result = {}
        cateManual = {
            "Zard": "Zard",
            "玩具汽车": "玩具汽车",
            "儿童": "儿童",
            "幼儿": "幼儿",
            "儿童玩具": "儿童玩具",
            "昆虫": "昆虫",
            "动物世界": "动物世界",
            "纪录片": "纪录片",
            "相声小品": "相声小品",
            "搞笑": "搞笑",
            "假窗-白噪音": "窗+白噪音",
            "演唱会": "演唱会"
        }
        classes = []
        for k in cateManual:
            classes.append({
                'type_name': k,
                'type_id': cateManual[k]
            })
        result['class'] = classes
        if (filter):
            result['filters'] = self.config['filter']
        return result

    def homeVideoContent(self):
        result = {
            'list': []
        }
        return result

    cookies = ''

    def getCookie(self):
        # 在cookies_str中填入会员或大会员cookie，以获得更好的体验。
        cookies_str = "innersign=0; buvid3=606BE156-AE37-AEA8-7052-9DA0B21766E776404infoc; b_nut=1663302976; i-wanna-go-back=-1; b_ut=7; b_lsid=4106252F6_18344933A90; _uuid=586AAEB7-6B88-A691-F7AC-95C27E57F53C43036infoc; buvid4=B6FF1449-4361-1C76-DEFC-4AFCA1777B7E78304-022091612-PdJr0jKE6N5TamfAEX9uACD1RXvklspbNdlcIQEFLMu0d9wS3G3sdA%3D%3D; buvid_fp=2a9b54d5e06aa54293dc7544e000552d"
        cookies_dic = dict([co.strip().split('=') for co in cookies_str.split(';')])
        rsp = session()
        cookies_jar = utils.cookiejar_from_dict(cookies_dic)
        rsp.cookies = cookies_jar
        content = self.fetch("http://api.bilibili.com/x/web-interface/nav", cookies=rsp.cookies)
        res = json.loads(content.text)
        if res["code"] == 0:
            self.cookies = rsp.cookies
        else:
            rsp = self.fetch("https://www.bilibili.com/")
            self.cookies = rsp.cookies
        return rsp.cookies

    def categoryContent(self, tid, pg, filter, extend):
        result = {}
        url = 'https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword={0}&page={1}'.format(tid, pg)
        if len(self.cookies) <= 0:
            self.getCookie()
        rsp = self.fetch(url, cookies=self.cookies)
        content = rsp.text
        jo = json.loads(content)
        videos = []
        vodList = jo['data']['result']
        for vod in vodList:
            aid = str(vod['aid']).strip()
            title = vod['title'].replace("", "").replace("", "").replace(""", '"')
            img = 'https:' + vod['pic'].strip()
            remark = str(vod['duration']).strip()
            videos.append({
                "vod_id": aid,
                "vod_name": title,
                "vod_pic": img,
                "vod_remarks": remark
            })
        result['list'] = videos
        result['page'] = pg
        result['pagecount'] = 9999
        result['limit'] = 90
        result['total'] = 999999
        return result

    def cleanSpace(self, str):
        return str.replace('\n', '').replace('\t', '').replace('\r', '').replace(' ', '')

    def detailContent(self, array):
        aid = array[0]
        url = "https://api.bilibili.com/x/web-interface/view?aid={0}".format(aid)
        rsp = self.fetch(url, headers=self.header)
        jRoot = json.loads(rsp.text)
        jo = jRoot['data']
        title = jo['title'].replace("", "").replace("", "")
        pic = jo['pic']
        desc = jo['desc']
        timeStamp = jo['pubdate']
        timeArray = time.localtime(timeStamp)
        year = str(time.strftime("%Y", timeArray))
        dire = jo['owner']['name']
        typeName = jo['tname']
        remark = str(jo['duration']).strip()
        vod = {
            "vod_id": aid,
            "vod_name": title,
            "vod_pic": pic,
            "type_name": typeName,
            "vod_year": year,
            "vod_area": "",
            "vod_remarks": remark,
            "vod_actor": "",
            "vod_director": dire,
            "vod_content": desc
        }
        ja = jo['pages']
        playUrl = ''
        for tmpJo in ja:
            cid = tmpJo['cid']
            part = tmpJo['part'].replace("#", "-")
            playUrl = playUrl + '{0}${1}_{2}#'.format(part, aid, cid)

        vod['vod_play_from'] = 'B站视频'
        vod['vod_play_url'] = playUrl

        result = {
            'list': [
                vod
            ]
        }
        return result

    def searchContent(self, key, quick):
        header = {
            "Referer": "https://www.bilibili.com",
            "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
        }
        url = 'https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword={0}'.format(key)
        if len(self.cookies) <= 0:
            self.getCookie()
        rsp = self.fetch(url, cookies=self.cookies,headers=header)
        content = rsp.text
        jo = json.loads(content)
        if jo['code'] != 0:
            rspRetry = self.fetch(url, cookies=self.getCookie())
            content = rspRetry.text
        jo = json.loads(content)
        videos = []
        vodList = jo['data']['result']
        for vod in vodList:
            aid = str(vod['aid']).strip()
            title = vod['title'].replace("", "").replace("", "").replace(""", '"')
            img = 'https:' + vod['pic'].strip()
            remark = str(vod['duration']).strip()
            videos.append({
                "vod_id": aid,
                "vod_name": title,
                "vod_pic": img,
                "vod_remarks": remark
            })
        result = {
            'list': videos
        }
        return result

    def playerContent(self, flag, id, vipFlags):
        result = {}

        ids = id.split("_")
        url = 'https://api.bilibili.com:443/x/player/playurl?avid={0}&cid={1}&qn=116'.format(ids[0], ids[1])
        if len(self.cookies) <= 0:
            self.getCookie()
        rsp = self.fetch(url, cookies=self.cookies)
        jRoot = json.loads(rsp.text)
        jo = jRoot['data']
        ja = jo['durl']

        maxSize = -1
        position = -1
        for i in range(len(ja)):
            tmpJo = ja[i]
            if maxSize < int(tmpJo['size']):
                maxSize = int(tmpJo['size'])
                position = i

        url = ''
        if len(ja) > 0:
            if position == -1:
                position = 0
            url = ja[position]['url']

        result["parse"] = 0
        result["playUrl"] = ''
        result["url"] = url
        result["header"] = {
            "Referer": "https://www.bilibili.com",
            "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
        }
        result["contentType"] = 'video/x-flv'
        return result

    config = {
        "player": {},
        "filter": {}
    }
    header = {}

    def localProxy(self, param):
        return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import re
import math
import json

class Spider(Spider):
	def getName(self):
		return "企鹅体育"
	def init(self,extend=""):
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
			"全部": ""
		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name': k,
				'type_id': cateManual[k]
			})

		result['class'] = classes
		if (filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {}
		return result

	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'https://m.jrskbs.com'
		rsp = self.fetch(url)
		html = self.html(rsp.text)
		aList = html.xpath("//div[contains(@class, 'contentList')]/a")
		videos = []
		numvL = len(aList)
		pgc = math.ceil(numvL/15)
		for a in aList:
			aid = a.xpath("./@href")[0]
			aid = self.regStr(reg=r'/live/(.*?).html', src=aid)
			img = a.xpath(".//div[@class='contentLeft']/p/img/@src")[0]
			home = a.xpath(".//div[@class='contentLeft']/p[@class='false false']/text()")[0]
			away = a.xpath(".//div[@class='contentRight']/p[@class='false false']/text()")[0]
			infoArray = a.xpath(".//div[@class='contentCenter']/p")
			remark = ''
			for info in infoArray:
				content = info.xpath('string(.)').replace(' ','')
				remark = remark + '|' + content
			videos.append({
				"vod_id": aid,
				"vod_name": home + 'vs' + away,
				"vod_pic": img,
				"vod_remarks": remark.strip('|')
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = pgc
		result['limit'] = numvL
		result['total'] = numvL
		return result

	def detailContent(self,array):
		aid = array[0]
		url = 'https://ddys.tv/{0}/'.format(aid)
		rsp = self.fetch(url)
		self.cookies = rsp.cookies
		self.url = url
		html = self.html(rsp.text)
		title = html.xpath("//div[@class='title']/a/text()")[0]
		infoList = html.xpath("//div[@class='abstract']/text()")
		cont = infoList[-1].replace('简介: ','').replace('\u3000',' ')
		pic = html.xpath("//div[@class='post']/img/@src")[0]
		remark = html.xpath("//div[@class='entry']/font/text()")[0]
		for info in infoList:
			if info.startswith('导演'):
				dir = info.replace('导演: ','').strip()
			if info.startswith('演员'):
				act = info.replace('演员: ','').replace(' / ','').strip()
			if info.startswith('类型'):
				typeName = info.replace('类型: ','').replace(' ','')
			if info.startswith('制片国家/地区'):
				area = info.replace('制片国家/地区: ','').replace(' ','')
			if info.startswith('年份'):
				year = info.replace('年份: ','').replace(' ','')
		vod = {
			"vod_id": aid,
			"vod_name": title,
			"vod_pic": pic,
			"type_name": typeName,
			"vod_year": year,
			"vod_area": area,
			"vod_remarks": remark,
			"vod_actor": act,
			"vod_director": dir,
			"vod_content": cont
		}
		rootList = html.xpath("//script[@class='wp-playlist-script']/text()")[0]
		jo = json.loads(rootList.replace(' ', '').replace('\n', ''))['tracks']
		playUrl = ''
		for tmpJo in jo:
			purl = tmpJo['src1']
			name = tmpJo['caption']
			playUrl = playUrl + '{0}${1}#'.format(name, purl)
		vod['vod_play_from'] = '低端影视'
		vod['vod_play_url'] = playUrl

		result = {
			'list': [
				vod
			]
		}
		return result

	def searchContent(self,key,quick):
		result = {}
		return result

	def playerContent(self,flag,id,vipFlags):
		result = {}

		headers = {
			"referer": self.url,
			"sec-fetch-dest": "empty",
			"sec-fetch-mode": "cors",
			"sec-fetch-site": "same-origin",
			"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
		}
		url = 'https://ddys.tv/getvddr/video?id={0}&dim=1080P&type=mix'.format(id)
		rsp = self.fetch(url,cookies=self.cookies,headers=headers)
		jo = json.loads(rsp.text)
		url = jo['url']
		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = ''
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		action = {
			'url':'',
			'header':'',
			'param':'',
			'type':'string',
			'after':''
		}
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json

class Spider(Spider):
	def getName(self):
		return "斗鱼"
	def init(self,extend=""):
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
			"真的很博通": "222931",
			"热门游戏": "热门游戏",
			"主机游戏": "主机游戏",
			"原创IP": "原创IP"
		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name': k,
				'type_id': cateManual[k]
			})

		result['class'] = classes
		if (filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {}
		return result
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'http://live.yj1211.work/api/live/getRecommendByPlatformArea?platform=douyu&size=20&area={0}&page={1}'.format(tid, pg)
		rsp = self.fetch(url)
		content = rsp.text
		jo = json.loads(content)
		videos = []
		vodList = jo['data']
		for vod in vodList:
			aid = (vod['roomId']).strip()
			title = vod['roomName'].strip()
			img = vod['roomPic'].strip()
			remark = (vod['categoryName']).strip()
			videos.append({
				"vod_id": aid,
				"vod_name": title,
				"vod_pic": img,
				"vod_remarks": remark
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = 9999
		result['limit'] = 90
		result['total'] = 999999
		return result
	def detailContent(self,array):
		aid = array[0]
		url = "http://live.yj1211.work/api/live/getRoomInfo?platform=douyu&roomId={0}".format(aid)
		rsp = self.fetch(url)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		title = jo['roomName']
		pic = jo['roomPic']
		desc = str(jo['online'])
		dire = jo['ownerName']
		typeName = jo['categoryName']
		remark = jo['categoryName']
		vod = {
			"vod_id": aid,
			"vod_name": title,
			"vod_pic": pic,
			"type_name": typeName,
			"vod_year": "",
			"vod_area": "",
			"vod_remarks": remark,
			"vod_actor": '在线人数:' + desc,
			"vod_director": dire,
			"vod_content": ""
		}
		playUrl = '原画' + '${0}#'.format(aid)
		vod['vod_play_from'] = '斗鱼直播'
		vod['vod_play_url'] = playUrl

		result = {
			'list': [
				vod
			]
		}
		return result
	def searchContent(self,key,quick):
		result = {}
		return result
	def playerContent(self,flag,id,vipFlags):
		result = {}

		url = 'http://live.yj1211.work/api/live/getRealUrl?platform=douyu&roomId={0}'.format(id)
		rsp = self.fetch(url)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		ja = jo['OD']
		url = ja

		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = {
			"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
		}
		result["contentType"] = 'video/x-flv'
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	config = {
		"player": {},
		"filter": {}
	}
	header = {}
	def localProxy(self,param):
		action = {
			'url':'',
			'header':'',
			'param':'',
			'type':'string',
			'after':''
		}
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import re
import math

class Spider(Spider):
	def getName(self):
		return "体育直播"
	def init(self,extend=""):
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
			"全部": ""
		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name': k,
				'type_id': cateManual[k]
			})

		result['class'] = classes
		if (filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {}
		return result

	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'http://www.freezb.live/'
		rsp = self.fetch(url)
		html = self.html(rsp.text)
		aList = html.xpath("//tr[@class='match_main']")
		videos = []
		img = 'https://s1.ax1x.com/2022/10/07/x3NPUO.png'
		for a in aList:
			urlList = a.xpath("./td[@class='update_data live_link']/a")
			stat = a.xpath("./td[contains(@style, 'font-weight:bold')]/sapn/@title")[0]
			time = a.xpath("./td[contains(@style, 'font-weight:bold')]/sapn/text()")[0]
			if '比分' not in urlList[0].xpath("./text()")[0] and stat == '直播中':
				remark = a.xpath(".//p[@class='raceclass matchcolor']/@title")[0].replace('直播','') + '|' + time
				name = a.xpath("string(./td[4])").replace(' ','').replace('\tVS','VS')
				if 'VS' not in name:
					names = name.split('\t')
					remark = names[0] + '|' + time
					name = names[-1].replace('vs','VS')
				aid = ''
				for url in urlList:
					title = url.xpath("./text()")[0]
					aurl = url.xpath("./@href")[0]
					aurl = self.regStr(reg=r'/tv/(.*?).html', src=aurl)
					if '比分' not in title:
						aid = aid + title + '@@@' + aurl + '#'
				videos.append({
					"vod_id": name + '###' + remark.split('|')[0] + '###' + aid,
					"vod_name": name,
					"vod_pic": img,
					"vod_remarks": remark
				})
		numvL = len(videos)
		pgc = math.ceil(numvL/15)
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = pgc
		result['limit'] = numvL
		result['total'] = numvL
		return result

	def detailContent(self,array):
		aid = array[0]
		aids = aid.split('###')
		name = aids[0]
		typeName = aids[1]
		tus = aids[2].strip('#').split('#')
		pic = 'https://s1.ax1x.com/2022/10/07/x3NPUO.png'
		vod = {
			"vod_id": name,
			"vod_name": name,
			"vod_pic": pic,
			"type_name": typeName,
			"vod_year": "",
			"vod_area": "",
			"vod_remarks": '',
			"vod_actor": '',
			"vod_director":'',
			"vod_content": ''
		}
		purl = ''
		for tu in tus:
			title = tu.split('@@@')[0]
			uid = tu.split('@@@')[1]
			url = "http://www.freezb.live/tv/{0}.html".format(uid)
			rsp = self.fetch(url)
			root = self.html(rsp.text)
			phpurl = root.xpath("//div[@class='media']/iframe/@src")[0]
			purl = purl + '{0}${1}@@@{2}'.format(title,phpurl,uid) + '#'
		vod['vod_play_from'] = '体育直播'
		vod['vod_play_url'] = purl
		result = {
			'list': [
				vod
			]
		}
		return result

	def searchContent(self,key,quick):
		result = {}
		return result

	def playerContent(self,flag,id,vipFlags):
		result = {}
		ids = id.split('@@@')
		url = ids[0]
		vid = ids[1]
		headers = {
			"referer": "http://www.freezb.live/tv/{0}.html".format(vid),
			"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
		}
		rsp = self.fetch(url,headers=headers)
		aurl = self.regStr(reg=r'\"../(.*?)\"', src=rsp.text)
		if aurl =='':
			url = self.regStr(reg=r"url: \'(.*?)\'", src=rsp.text)
		else:
			pheaders = {
				"referer": url,
				"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
			}
			purl = self.regStr(reg=r'(.*)/', src=url) + '/' + aurl
			prsp = self.fetch(purl, headers=pheaders)
			url = self.regStr(reg=r"url: \'(.*?)\'", src=prsp.text)
		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = ''
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		action = {
			'url':'',
			'header':'',
			'param':'',
			'type':'string',
			'after':''
		}
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import requests
import json

class Spider(Spider):
	def getDependence(self):
		return ['py_ali']
	def getName(self):
		return "py_gitcafe"
	def init(self,extend):
		self.ali = extend[0]
		print("============py_gitcafe============")
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
			"华语电视" :"hyds",
			"日韩电视" :"rhds",
			"欧美电视" :"omds",
			"其他电视" :"qtds",
			"华语电影" :"hydy",
			"日韩电影" :"rhdy",
			"欧美电影" :"omdy",
			"其他电影" :"qtdy",
			"华语动漫" :"hydm",
			"日韩动漫" :"rhdm",
			"欧美动漫" :"omdm",
			"纪录片" :"jlp",
			"综艺片" :"zyp",
			"教育培训" :"jypx",
			"其他视频" :"qtsp",
			"华语音乐" :"hyyy",
			"日韩音乐" :"rhyy",
			"欧美音乐" :"omyy",
			"其他音乐" :"qtyy"
		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name':k,
				'type_id':cateManual[k]
			})
		result['class'] = classes
		if filter:
			result['filter'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {}
		if len(self.homeData.keys()) == 0:
			url = self.baseUrl+'/alipaper/home.json'
			self.homeData = self.fetch(url,headers=self.header).json()
		cateList = self.homeData['data']
		videos = []
		for cate in cateList:
			if cate['info']['code'] in self.category:
				vodList = cate['data']
				for vod in vodList:
					videos.append({
						"vod_id":"https://www.aliyundrive.com/s/" + vod['key'],
						"vod_name":vod['title'],
						"vod_pic":'https://txc.gtimg.com/data/375895/2022/0214/d6b96cc3799b6417d30e4715d2973f64.png',
						"vod_remarks":''
					})
		result['list']=videos
		return result
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = self.baseUrl+'/tool/alipaper/'
		form = {
			"action": "viewcat",
			"cat": tid,
			"num":pg
		}

		rsp = requests.post(url,headers=self.header,data=form)
		vodList = json.loads(self.cleanText(rsp.text))
		videos = []
		for vod in vodList:
			videos.append({
				"vod_id": 'https://www.aliyundrive.com/s/'+vod["key"],
				"vod_name": vod["title"],
				"vod_pic": "https://txc.gtimg.com/data/375895/2022/0214/d6b96cc3799b6417d30e4715d2973f64.png",
				"vod_remarks": vod['cat']
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = 9999
		result['limit'] = 90
		result['total'] = 999999
		return result
	category = ['hydm','hyds','hydy','omdm','omds','omdy','rhdm','rhds','rhdy','qtds','qtdy','qtsp','jlp','zyp']
	def detailContent(self,array):
		return self.ali.detailContent(array)
	def searchContent(self,key,quick):
		result = {}
		url = self.baseUrl+'/tool/alipaper/'
		form = {
			"action": "search",
			"keyword": key
		}
		vodList = requests.post(url,headers=self.header,data=form).json()
		videos = []
		for vod in vodList:
			videos.append({
				"vod_id": 'https://www.aliyundrive.com/s/'+vod["key"],
				"vod_name": vod["title"],
				"vod_pic": "https://txc.gtimg.com/data/375895/2022/0214/d6b96cc3799b6417d30e4715d2973f64.png",
				"vod_remarks": vod['cat']
			})
		result = {
			'list':videos
		}
		return result
	def playerContent(self,flag,id,vipFlags):
		return self.ali.playerContent(flag,id,vipFlags)

	homeData = {}
	baseUrl = 'https://gitcafe.net'
	config = {
		"player": {},
		"filter": {}
	}
	header = {
		"User-Agent": "Mozilla/5.0 (Linux; Android 12; V2049A Build/SP1A.210812.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.129 Mobile Safari/537.36",
        "Referer": "https://u.gitcafe.net/"
	}
	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json

class Spider(Spider):
	def getName(self):
		return "虎牙"
	def init(self,extend=""):
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
			"一起看": "一起看",
			"三国杀": "三国杀",
			"网游竞技": "网游竞技"
		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name': k,
				'type_id': cateManual[k]
			})

		result['class'] = classes
		if (filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {}
		return result
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'http://live.yj1211.work/api/live/getRecommendByPlatformArea?platform=huya&size=20&area={0}&page={1}'.format(tid, pg)
		rsp = self.fetch(url)
		content = rsp.text
		jo = json.loads(content)
		videos = []
		vodList = jo['data']
		for vod in vodList:
			aid = (vod['roomId']).strip()
			title = vod['roomName'].strip()
			img = vod['roomPic'].strip()
			remark = (vod['categoryName']).strip()
			videos.append({
				"vod_id": aid,
				"vod_name": title,
				"vod_pic": img,
				"vod_remarks": remark
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = 9999
		result['limit'] = 90
		result['total'] = 999999
		return result
	def detailContent(self,array):
		aid = array[0]
		url = "http://live.yj1211.work/api/live/getRoomInfo?platform=huya&roomId={0}".format(aid)
		rsp = self.fetch(url)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		title = jo['roomName']
		pic = jo['roomPic']
		desc = str(jo['online'])
		dire = jo['ownerName']
		typeName = jo['categoryName']
		remark = jo['categoryName']
		vod = {
			"vod_id": aid,
			"vod_name": title,
			"vod_pic": pic,
			"type_name": typeName,
			"vod_year": "",
			"vod_area": "",
			"vod_remarks": remark,
			"vod_actor": '在线人数:' + desc,
			"vod_director": dire,
			"vod_content": ""
		}
		playUrl = '原画' + '${0}#'.format(aid)
		vod['vod_play_from'] = '虎牙直播'
		vod['vod_play_url'] = playUrl

		result = {
			'list': [
				vod
			]
		}
		return result
	def searchContent(self,key,quick):
		result = {}
		return result
	def playerContent(self,flag,id,vipFlags):
		result = {}

		url = 'https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid={0}'.format(id)
		rsp = self.fetch(url)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		ja = jo['stream']['baseSteamInfoList'][0]['sStreamName']
		url = 'http://txtest-xp2p.p2p.huya.com/src/' + ja + '.xs?ratio=4000'

		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = {
			"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
		}
		result["contentType"] = 'video/x-flv'
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	config = {
		"player": {},
		"filter": {}
	}
	header = {}
	def localProxy(self,param):
		action = {
			'url':'',
			'header':'',
			'param':'',
			'type':'string',
			'after':''
		}
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import re
import math

class Spider(Spider):
	def getName(self):
		return "体育直播"
	def init(self,extend=""):
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
			"全部": ""
		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name': k,
				'type_id': cateManual[k]
			})

		result['class'] = classes
		if (filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {}
		return result

	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'https://m.jrskbs.com'
		rsp = self.fetch(url)
		html = self.html(rsp.text)
		aList = html.xpath("//div[contains(@class, 'contentList')]/a")
		videos = []
		numvL = len(aList)
		pgc = math.ceil(numvL/15)
		for a in aList:
			aid = a.xpath("./@href")[0]
			aid = self.regStr(reg=r'/live/(.*?).html', src=aid)
			img = a.xpath(".//div[@class='contentLeft']/p/img/@src")[0]
			home = a.xpath(".//div[@class='contentLeft']/p[@class='false false']/text()")[0]
			away = a.xpath(".//div[@class='contentRight']/p[@class='false false']/text()")[0]
			infoArray = a.xpath(".//div[@class='contentCenter']/p")
			remark = ''
			for info in infoArray:
				content = info.xpath('string(.)').replace(' ','')
				remark = remark + '|' + content
			videos.append({
				"vod_id": aid,
				"vod_name": home + 'vs' + away,
				"vod_pic": img,
				"vod_remarks": remark.strip('|')
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = pgc
		result['limit'] = numvL
		result['total'] = numvL
		return result

	def detailContent(self,array):
		aid = array[0]
		url = "http://m.jrskbs.com/live/{0}.html".format(aid)
		rsp = self.fetch(url)
		root = self.html(rsp.text)
		divContent = root.xpath("//div[@class='today']")[0]
		home = divContent.xpath(".//p[@class='onePlayer homeTeam']/text()")[0]
		away = divContent.xpath(".//div[3]/text()")[0].strip()
		title = home + 'vs' + away
		pic = divContent.xpath(".//img[@class='gameLogo1 homeTeam_img']/@src")[0]
		typeName = divContent.xpath(".//div/p[@class='name1 matchTime_wap']/text()")[0]
		remark = divContent.xpath(".//div/p[@class='time1 matchTitle']/text()")[0].replace(' ','')
		vod = {
			"vod_id": aid,
			"vod_name": title,
			"vod_pic": pic,
			"type_name": typeName,
			"vod_year": "",
			"vod_area": "",
			"vod_remarks": remark,
			"vod_actor": '',
			"vod_director":'',
			"vod_content": ''
		}
		urlList = root.xpath("//div[@class='liveshow']/a")
		playUrl = ''
		for url in urlList:
			name = url.xpath("./text()")[0]
			purl = url.xpath("./@data-url")[0]
			playUrl =playUrl + '{0}${1}#'.format(name, purl)
		vod['vod_play_from'] = '体育直播'
		vod['vod_play_url'] = playUrl

		result = {
			'list': [
				vod
			]
		}
		return result

	def searchContent(self,key,quick):
		result = {}
		return result

	def playerContent(self,flag,id,vipFlags):
		result = {}
		url = id
		if '04stream' in url:
			rsp = self.fetch(url)
			html = rsp.text
			strList = re.findall(r"eval\((.*?)\);", html)
			fuctList = strList[1].split('+')
			scrpit = ''
			for fuc in fuctList:
				if fuc.endswith(')'):
					append = fuc.split(')')[-1]
				else:
					append = ''
				Unicode = int(self.regStr(reg=r'l\((.*?)\)', src=fuc))
				char = chr(Unicode % 256)
				char = char + append
				scrpit = scrpit + char
			par = self.regStr(reg=r'/(.*)/', src=scrpit).replace(')', '')
			pars = par.split('/')
			infoList = strList[2].split('+')
			str = ''
			for info in infoList:
				if info.startswith('O'):
					Unicode = int(int(self.regStr(reg=r'O\((.*?)\)', src=info)) / int(pars[0]) / int(pars[1]))
					char = chr(Unicode % 256)
					str = str + char
			url = self.regStr(reg=r"play_url=\'(.*?)\'", src=str)
			result["parse"] = 0
		else:
			url = id
			result["parse"] = 1
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = ''
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		action = {
			'url':'',
			'header':'',
			'param':'',
			'type':'string',
			'after':''
		}
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider

class Spider(Spider):
	def getDependence(self):
		return ['py_ali']
	def getName(self):
		return "py_pansou"
	def init(self,extend):
		self.ali = extend[0]
		print("============py_pansou============")
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		return result
	def homeVideoContent(self):
		result = {}
		return result
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		return result

	def detailContent(self,array):
		tid = array[0]
		print(self.getName())
		pattern = '(https:\\/\\/www.aliyundrive.com\\/s\\/[^\\\"]+)'
		url = self.regStr(tid,pattern)
		if len(url) > 0:
			return self.ali.detailContent(array)

		rsp = self.fetch('https://www.alipansou.com'+tid)
		url = self.regStr(rsp.text,pattern)
		if len(url) == 0:
			return ""
		url = url.replace('\\','')
		newArray = [url]
		print(newArray)
		return self.ali.detailContent(newArray)

	def searchContent(self,key,quick):
		map = {
			'7':'文件夹',
			'1':'视频'
		}
		ja = []
		for tKey in map.keys():
			url = "https://www.alipansou.com/search?k={0}&t={1}".format(key,tKey)
			rsp = self.fetch(url)
			root = self.html(self.cleanText(rsp.text))
			aList = root.xpath("//van-row/a")
			for a in aList:
				title = ''
				# title = a.xpath('string(.//template/div)')
				# title = self.cleanText(title).strip()

				divList = a.xpath('.//template/div')
				for div in divList:
					t = div.xpath('string(.)')
					t = self.cleanText(t).strip()
					title = title + t
				if key in title:
					pic = 'https://www.alipansou.com'+ self.xpText(a,'.//van-card/@thumb')
					jo = {
						'vod_id': a.xpath('@href')[0],
						'vod_name': '[{0}]{1}'.format(key,title),
						'vod_pic': pic
					}
					ja.append(jo)
		result = {
			'list':ja
		}
		return result

	def playerContent(self,flag,id,vipFlags):
		return self.ali.playerContent(flag,id,vipFlags)

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json
import math

class Spider(Spider):
	def getName(self):
		return "企鹅体育"
	def init(self,extend=""):
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
			"全部": "",
			"足球": "Football",
			"篮球": "Basketball",
			"NBA": "NBA",
			"台球": "Billiards",
			"搏击": "Fight",
			"网排": "Tennis",
			"游戏": "Game",
			"其他": "Others",
			"橄棒冰": "MLB"
		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name': k,
				'type_id': cateManual[k]
			})

		result['class'] = classes
		if (filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {}
		return result

	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'https://live.qq.com/api/live/vlist?page_size=60&shortName={0}&page={1}'.format(tid, pg)
		rsp = self.fetch(url)
		content = rsp.text
		jo = json.loads(content)
		videos = []
		vodList = jo['data']['result']
		numvL = len(vodList)
		pgc = math.ceil(numvL/15)
		for vod in vodList:
			aid = (vod['room_id'])
			title = vod['room_name'].strip()
			img = vod['room_src']
			remark = (vod['game_name']).strip()
			videos.append({
				"vod_id": aid,
				"vod_name": title,
				"vod_pic": img,
				"vod_remarks": remark
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = pgc
		result['limit'] = numvL
		result['total'] = numvL
		return result

	def detailContent(self,array):
		aid = array[0]
		url = "https://m.live.qq.com/{0}".format(aid)
		rsp = self.fetch(url)
		html = self.cleanText(rsp.text)
		if self.regStr(reg=r'\"show_status\":\"(\d)\"', src=html) == '1':
			title = self.regStr(reg=r'\"room_name\":\"(.*?)\"', src=html)
			pic = self.regStr(reg=r'\"room_src\":\"(.*?)\"', src=html)
			typeName = self.regStr(reg=r'\"game_name\":\"(.*?)\"', src=html)
			remark = self.regStr(reg=r'\"nickname\":\"(.*?)\"', src=html)
			purl = self.regStr(reg=r'\"hls_url\":\"(.*?)\"', src=html)
		else:
			return {}
		vod = {
			"vod_id": aid,
			"vod_name": title,
			"vod_pic": pic,
			"type_name": typeName,
			"vod_year": "",
			"vod_area": "",
			"vod_remarks": remark,
			"vod_actor": '',
			"vod_director":'',
			"vod_content": ''
		}
		playUrl = '{0}${1}#'.format(typeName, purl)
		vod['vod_play_from'] = '企鹅体育'
		vod['vod_play_url'] = playUrl

		result = {
			'list': [
				vod
			]
		}
		return result

	def searchContent(self,key,quick):
		result = {}
		return result
	def playerContent(self,flag,id,vipFlags):
		result = {}
		url = id
		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = ''
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		action = {
			'url':'',
			'header':'',
			'param':'',
			'type':'string',
			'after':''
		}
		return [200, "video/MP2T", action, ""]


code:
# coding=utf-8
# !/usr/bin/python
import sys
import re
sys.path.append('..')
from base.spider import Spider

class Spider(Spider):  # 元类 默认的元类 type
    def getName(self):
        return "完美看看"

    def init(self, extend=""):
        print("============{0}============".format(extend))
        pass

    def homeContent(self, filter):
        result = {}
        cateManual = {
            "电影": "1",
            "国产剧": "5",
            "欧美剧": "2",
            "韩剧": "3",
            "泰剧": "9",
            "日剧": "4",
            "动漫": "6",
            "综艺": "7",
            "纪录片": "10"
        }
        classes = []
        for k in cateManual:
            classes.append({
                'type_name': k,
                'type_id': cateManual[k]
            })

        result['class'] = classes
        if (filter):
            result['filters'] = self.config['filter']
        return result

    def homeVideoContent(self):
        result = {
            'list': []
        }
        return result

    def categoryContent(self, tid, pg, filter, extend):
        result = {}
        url = 'https://www.wanmeikk.film/category/{0}-{1}.html'.format(tid, pg)
        rsp = self.fetch(url)
        root = self.html(rsp.text)
        aList = root.xpath("//div[@class='stui-pannel_bd']/ul[1]/li")
        videos = []
        for a in aList:
            name = a.xpath('./div/a/@title')[0]
            pic = a.xpath('./div/a/@data-original')[0]
            mark = a.xpath("./div/a/span[@class='pic-text text-right']/text()")[0]
            sid = a.xpath("./div/a/@href")[0].replace("/", "").replace("project", "").replace(".html", "")
            videos.append({
                "vod_id": sid,
                "vod_name": name,
                "vod_pic": pic,
                "vod_remarks": mark
            })
        result['list'] = videos
        result['page'] = pg
        result['pagecount'] = 9999
        result['limit'] = 90
        result['total'] = 999999
        return result

    def detailContent(self, array):
        tid = array[0]
        url = 'https://www.wanmeikk.film/project/{0}.html'.format(tid)
        header = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"}
        rsp = self.fetch(url, headers=header)
        root = self.html(rsp.content)
        divContent = root.xpath("//div[@class='col-lg-wide-75 col-xs-1']")[0]
        title = divContent.xpath(".//h1[@class='title']/text()")[0]
        pic = divContent.xpath(".//a[@class='stui-vodlist__thumb picture v-thumb']/img/@data-original")[0]
        detail = divContent.xpath(".//p[@class='desc detail hidden-xs']/span[@class='detail-content']/text()")[0]
        vod = {
            "vod_id": tid,
            "vod_name": title,
            "vod_pic": pic,
            "type_name": "",
            "vod_year": "",
            "vod_area": "",
            "vod_remarks": "",
            "vod_actor": "",
            "vod_director": "",
            "vod_content": detail
        }
        infoArray = divContent.xpath(".//div[@class='stui-content__detail']/p[@class='data']")
        for info in infoArray:
            content = info.xpath('string(.)')
            if content.startswith('类型'):
                infon = content.split('\xa0')
                for inf in infon:
                    if inf.startswith('类型'):
                        vod['type_name'] = inf.replace("类型：", "")
                    if inf.startswith('地区'):
                        vod['vod_area'] = inf.replace("地区：", "")
                    if inf.startswith('年份'):
                        vod['vod_year'] = inf.replace("年份：", "")
            if content.startswith('主演'):
                vod['vod_actor'] = content.replace("\xa0", "/").replace("主演：", "")
            if content.startswith('导演'):
                vod['vod_director'] = content.replace("\xa0", "").replace("导演：", "")
        vod_play_url = '$$$'
        vod['vod_play_from'] = '完美看看'
        purl = divContent.xpath(".//div[@class='stui-pannel_bd col-pd clearfix']/ul/li")
        playList = []
        vodItems = []
        for plurl in purl:
            plaurl = plurl.xpath(".//a/@href")[0]
            name = plurl.xpath(".//a/text()")[0]
            tId = self.regStr(plaurl, '/play/(\\S+).html')
            vodItems.append(name + "$" + tId)
        joinStr = '#'
        joinStr = joinStr.join(vodItems)
        playList.append(joinStr)
        vod_play_url = vod_play_url.join(playList)
        vod['vod_play_url'] = vod_play_url
        result = {
            'list': [
                vod
            ]
        }
        return result

    def searchContent(self, key, quick):
        result = {}
        return result

    def playerContent(self, flag, id, vipFlags):
        result = {}
        url = 'https://www.wanmeikk.film/play/{0}.html'.format(id)
        rsp = self.fetch(url)
        root = self.html(rsp.text)
        scripts = root.xpath("//div[@class='stui-player__video embed-responsive embed-responsive-16by9 clearfix']/script/text()")[0]
        key = scripts.split("url")[1].replace('"', "").replace(':', "").replace(',', "").replace("'", "")
        surl = 'https://www.wanmeikk.film/dplayer.php?url={0}'.format(key)
        srsp = self.fetch(surl)
        sroot = self.html(srsp.text)
        murl = sroot.xpath("//script[@type='text/javascript']/text()")[0]
        mp4url = re.findall(r"var urls = '(.*)';", murl)[0]
        result["parse"] = 0
        result["playUrl"] = ''
        result["url"] = mp4url
        result["header"] = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"}
        return result

    config = {
        "player": {},
        "filter": {}
    }
    header = {}

    def isVideoFormat(self, url):
        pass

    def manualVideoCheck(self):
        pass

    def localProxy(self, param):
        action = {
            'url': '',
            'header': '',
            'param': '',
            'type': 'string',
            'after': ''
        }
        return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import requests

class Spider(Spider):
	def getDependence(self):
		return ['py_ali']
	def getName(self):
		return "py_yiso"
	def init(self,extend):
		self.ali = extend[0]
		print("============py_yiso============")
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		return result
	def homeVideoContent(self):
		result = {}
		return result
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		return result
	header = {
		"User-Agent": "Mozilla/5.0 (Linux; Android 12; V2049A Build/SP1A.210812.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.129 Mobile Safari/537.36",
		"Referer": "https://yiso.fun/"
	}
	def detailContent(self,array):
		return self.ali.detailContent(array)

	def searchContent(self,key,quick):
		url = "https://yiso.fun/api/search?name={0}&from=ali".format(key)
		vodList = requests.get(url=url, headers=self.header, verify=False).json()["data"]["list"]
		videos = []
		for vod in vodList:
			videos.append({
				"vod_id": vod["url"],
				"vod_name": vod["fileInfos"][0]["fileName"],
				"vod_pic": "https://inews.gtimg.com/newsapp_bt/0/13263837859/1000",
				"vod_remarks": vod['gmtCreate']
			})
		result = {
			'list':videos
		}
		return result

	def playerContent(self,flag,id,vipFlags):
		return self.ali.playerContent(flag,id,vipFlags)

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json
import time
import base64

class Spider(Spider):
	def getName(self):
		return "一席"
	def init(self,extend=""):
		print("============{0}============".format(extend))
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		url = 'https://yixi.tv/api/site/category/?_=1'
		jo = self.fetch(url,headers=self.header).json()
		category = jo['data']['items']
		classes = []
		classes.append({
				'type_name':'全部',
				'type_id':''
			})
		for cat in category:
			classes.append({
				'type_name':cat['title'],
				'type_id':cat['id']
			})
		result['class'] = classes
		if(filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		# url = 'https://yixi.tv/api/site/album/?page=1&page_size=4&_=1'
		url = 'https://yixi.tv/api/site/album/22/detail/?page=1&page_size=24&_=1'
		jo = self.fetch(url,headers=self.header).json()
		videos = []
		vodList = jo['data']['items']
		for vod in vodList:
			videos.append({
				"vod_id":vod['id'],
				"vod_name":vod['title'],
				"vod_pic":vod['cover'],
				"vod_remarks":vod['time']
			})
		result = {
			'list':videos
		}
		return result
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'https://yixi.tv/api/site/speech/?page={1}&page_size=12&category_id={0}&order_by=0&_=1'.format(tid,pg)
		jo = self.fetch(url,headers=self.header).json()
		videos = []
		vodList = jo['data']['items']
		for vod in vodList:
			videos.append({
				"vod_id":vod['id'],
				"vod_name":vod['title'],
				"vod_pic":vod['cover'],
				"vod_remarks":vod['time']
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = 9999
		result['limit'] = 90
		result['total'] = 999999
		return result
	def detailContent(self,array):
		tid = array[0]
		url = "https://yixi.tv/api/site/speech/{0}/detail/?_=1".format(tid)
		jo = self.fetch(url,headers=self.header).json()

		vod = {
			"vod_id":jo['data']['speech']['id'],
			"vod_name":jo['data']['speech']['title'],
			"vod_pic":jo['data']['speech']['cover'],
			"type_name":jo['data']['speech']['first_category'],
			"vod_year":"",
			"vod_area":"",
			"vod_remarks":jo['data']['speech']['date'],
			"vod_actor":"",
			"vod_director":"",
			"vod_content":jo['data']['speech']['titlelanguage']
		}

		vod['vod_play_from'] = '一席'
		pList = []
		for vUrl in jo['data']['speech']['video_url']:
			pList.append(vUrl['type_name']+"$"+vUrl['video_url'])
		vod['vod_play_url'] = '#'.join(pList)
		result = {
			'list':[
				vod
			]
		}
		return result
	def searchContent(self,key,quick):
		result = {
			'list':[]
		}
		return result
	def playerContent(self,flag,id,vipFlags):
		result = {}
		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = id
		result["header"] = ''
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {
		"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36"
	}

	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json

class Spider(Spider):  # 元类 默认的元类 type
	def getDependence(self):
		return ['py_ali']
	def getName(self):
		return "YYDS"
	def init(self,extend=""):
		self.ali = extend[0]
		print("============YYDS============".format(extend))
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
			"热门":"0",
			"电影":"3",
			"剧集":"12",
			"综艺":"10"
		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name':k,
				'type_id':cateManual[k]
			})

		result['class'] = classes
		return result
	def homeVideoContent(self):
		result = {
			'list':[]
		}
		return result
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		form = {
			'limit': 24,
			'skip': int(pg) * 24 - 24,
			'keyword': '',
			'category_id': tid,
		}
		rsp = self.post("https://cmn.yydshd.com/api/posts",data=form)
		jo = json.loads(rsp.text)
		vodList = jo['data']['list']
		videos = []
		for vod in vodList:
			name = vod['title']
			pic = vod['cover']
			sid = vod['id']
			suffix = ''
			if vod['is_vip'] == 1:
				suffix = ' 会员'
			mark = str(vod['score']) + suffix
			videos.append({
				"vod_id":sid,
				"vod_name":name,
				"vod_pic":pic,
				"vod_remarks":mark
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = 9999
		result['limit'] = 90
		result['total'] = 999999
		return result
	token = ''
	def getHeader(self,force=False):
		if len(self.token) == 0 or force:
			form = {
				'email': '',
				'password': ''
			}
			if len(form['password']) > 0:
				rsp = self.post("https://cmn.yydshd.com/api/login",data=form)
				jo = json.loads(rsp.text)
				self.token = jo['data']['token']
		return {
			'token':self.token,
			'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36 Edg/104.0.1293.70'
		}
	def detailContent(self,array):
		tid = array[0]
		result = {}
		form = {
			'id': tid
		}
		rsp = self.post("https://cmn.yydshd.com/api/post-info",data=form,headers=self.getHeader())
		jo = json.loads(rsp.text)
		if(jo['status_code'] == 403):
			retry = self.post("https://cmn.yydshd.com/api/post-info",data=form,headers=self.getHeader(True))
			jo = json.loads(retry.text)
			if jo['status_code'] == 403:
				return {'list':[]}
		vodInfo = jo['data']
		videos = []
		name = vodInfo['title']
		pic = vodInfo['cover']
		mark = vodInfo['score']
		vod = {
			"vod_id":tid,
			"vod_name":name,
			"vod_pic":pic,
			"type_name":"",
			"vod_year":vodInfo['year'],
			"vod_area":vodInfo['region'],
			"vod_remarks":mark,
			"vod_actor":vodInfo['actors'],
			"vod_director":vodInfo['director'],
			"vod_content":vodInfo['desc']
		}
		playList = vodInfo['links']
		tmpLink = ''
		for play in playList:
			if play['name'] == '阿里网盘':
				if len(play['item']) > 0:
					tmpLink = play['item'][0]['link']
				break
		if len(tmpLink) > 0:
			vod['vod_play_from'] = 'AliYun$$$AliYun原画'
			newArray = [tmpLink]
			rs = self.ali.detailContent(newArray)
			vod['vod_play_url'] = rs['list'][0]['vod_play_url']
		result = {
			'list':[
				vod
			]
		}
		return result

	def searchContent(self,key,quick):
		result = {}
		form = {
			'limit': 24,
			'skip': 0,
			'keyword': key,
			'category_id': -1,
		}
		rsp = self.post("https://cmn.yydshd.com/api/posts",data=form)
		jo = json.loads(rsp.text)
		vodList = jo['data']['list']
		videos = []
		for vod in vodList:
			name = vod['title']
			pic = vod['cover']
			sid = vod['id']
			suffix = ''
			if vod['is_vip'] == 1:
				suffix = ' 会员'
			mark = str(vod['score']) + suffix
			videos.append({
				"vod_id":sid,
				"vod_name":name,
				"vod_pic":pic,
				"vod_remarks":mark
			})
		result = {
			'list':videos
		}
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {
		"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36",
	}
	def playerContent(self,flag,id,vipFlags):
		return self.ali.playerContent(flag,id,vipFlags)
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider

class Spider(Spider):
	def getDependence(self):
		return ['py_ali']
	def getName(self):
		return "py_zhaozy"
	def init(self,extend):
		self.ali = extend[0]
		print("============py_zhaozy============")
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		return result
	def homeVideoContent(self):
		result = {}
		return result
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		return result
	header = {
		"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36",
		"Referer": "https://zhaoziyuan.me/"
	}
	def detailContent(self,array):
		tid = array[0]
		print(self.getName())
		pattern = '(https://www.aliyundrive.com/s/[^\"]+)'
		url = self.regStr(tid,pattern)
		if len(url) > 0:
			return self.ali.detailContent(array)

		rsp = self.fetch('https://zhaoziyuan.me/'+tid)
		url = self.regStr(rsp.text,pattern)
		if len(url) == 0:
			return ""
		newArray = [url]
		print(newArray)
		return self.ali.detailContent(newArray)

	def searchContent(self,key,quick):
		map = {
			'7':'文件夹',
			'1':'视频'
		}
		ja = []
		for tKey in map.keys():
			url = "https://zhaoziyuan.me/so?filename={0}&t={1}".format(key,tKey)
			rsp = self.fetch(url,headers=self.header)
			root = self.html(self.cleanText(rsp.text))
			aList = root.xpath("//li[@class='clear']//a")
			for a in aList:
				# title = a.xpath('./h3/text()')[0] + a.xpath('./p/text()')[0]
				title = self.xpText(a,'./h3/text()') + self.xpText(a,'./p/text()')
				pic = 'https://img0.baidu.com/it/u=603086994,1727626977&fm=253&fmt=auto?w=500&h=667'
				jo = {
					'vod_id': self.xpText(a,'@href'),
					'vod_name': '[{0}]{1}'.format(key,title),
					'vod_pic': pic
				}
				ja.append(jo)
		result = {
			'list':ja
		}
		return result

	def playerContent(self,flag,id,vipFlags):
		return self.ali.playerContent(flag,id,vipFlags)

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import requests
import json
import base64

class Spider(Spider):
	def getDependence(self):
		return ['py_ali']
	def getName(self):
		return "py_yunso"
	def init(self,extend):
		self.ali = extend[0]
		print("============py_yunso============")
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		return result
	def homeVideoContent(self):
		result = {}
		return result

	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		return result

	header = {
		"User-Agent": "Mozilla/5.0 (Linux; Android 12; V2049A Build/SP1A.210812.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.129 Mobile Safari/537.36",
		"origin": "https://www.upyunso.com/"
	}

	def detailContent(self,array):
		return self.ali.detailContent(array)

	def searchContent(self,key,quick):
		url = "https://api.upyunso.com/search?keyword={0}&page=1&s_type=2".format(key)
		rsp = requests.get(url=url, headers=self.header)
		vodList = json.loads(base64.b64decode(rsp.text))['result']['items']
		videos = []
		for vod in vodList:
			vid =vod['page_url']
			name = vod['title']
			if 'aliyundrive.com' in vid:
				videos.append({
					"vod_id": vid,
					"vod_name": name,
					"vod_pic": "https://inews.gtimg.com/newsapp_bt/0/13263837859/1000",
					"vod_remarks": vod['insert_time']
				})

		result = {
			'list':videos
		}
		return result

	def playerContent(self,flag,id,vipFlags):
		return self.ali.playerContent(flag,id,vipFlags)

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json
import time
import base64

class Spider(Spider):  # 元类 默认的元类 type
	def getName(self):
		return "哔哩"
	def init(self,extend=""):
		print("============{0}============".format(extend))
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
		    "中医药": "中医药",
		    "中医基础": "中医基础",
		    "中药基础": "中药基础",
		    "伤寒论": "伤寒论",
			"难经": "难经",
			"神农本草经": "神农本草经",
			"金匮要略": "金匮要略",
			"脉经": "脉经",
			"中藏经": "中藏经",
			"针灸甲乙经": "针灸甲乙经",
			"濒湖脉学": "濒湖脉学",
			"本草纲目": "本草纲目",
			"汤头歌诀": "汤头歌诀",
			"药性赋": "药性赋"

		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name':k,
				'type_id':cateManual[k]
			})
		result['class'] = classes
		if(filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {
			'list':[]
		}
		return result
	cookies = ''
	def getCookie(self):
		rsp = self.fetch("https://www.bilibili.com/")
		self.cookies = rsp.cookies
		return rsp.cookies
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword={0}&duration=4&page={1}'.format(tid,pg)
		if len(self.cookies) <= 0:
			self.getCookie()
		rsp = self.fetch(url,cookies=self.cookies)
		content = rsp.text
		jo = json.loads(content)
		if jo['code'] != 0:
			rspRetry = self.fetch(url,cookies=self.getCookie())
			content = rspRetry.text
		jo = json.loads(content)
		videos = []
		vodList = jo['data']['result']
		for vod in vodList:
			aid = str(vod['aid']).strip()
			title = vod['title'].strip().replace("","").replace("","")
			img = 'https:' + vod['pic'].strip()
			remark = str(vod['duration']).strip()
			videos.append({
				"vod_id":aid,
				"vod_name":title,
				"vod_pic":img,
				"vod_remarks":remark
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = 9999
		result['limit'] = 90
		result['total'] = 999999
		return result
	def cleanSpace(self,str):
		return str.replace('\n','').replace('\t','').replace('\r','').replace(' ','')
	def detailContent(self,array):
		aid = array[0]
		url = "https://api.bilibili.com/x/web-interface/view?aid={0}".format(aid)

		rsp = self.fetch(url,headers=self.header)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		title = jo['title'].replace("","").replace("","")
		pic = jo['pic']
		desc = jo['desc']
		typeName = jo['tname']
		vod = {
			"vod_id":aid,
			"vod_name":title,
			"vod_pic":pic,
			"type_name":typeName,
			"vod_year":"",
			"vod_area":"",
			"vod_remarks":"",
			"vod_actor":"",
			"vod_director":"",
			"vod_content":desc
		}
		ja = jo['pages']
		playUrl = ''
		for tmpJo in ja:
			cid = tmpJo['cid']
			part = tmpJo['part']
			playUrl = playUrl + '{0}${1}_{2}#'.format(part,aid,cid)

		vod['vod_play_from'] = 'B站'
		vod['vod_play_url'] = playUrl

		result = {
			'list':[
				vod
			]
		}
		return result
	def searchContent(self,key,quick):
		result = {
			'list':[]
		}
		return result
	def playerContent(self,flag,id,vipFlags):
		# https://www.555dianying.cc/vodplay/static/js/playerconfig.js
		result = {}

		ids = id.split("_")
		url = 'https://api.bilibili.com:443/x/player/playurl?avid={0}&cid=%20%20{1}&qn=112'.format(ids[0],ids[1])
		rsp = self.fetch(url)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		ja = jo['durl']

		maxSize = -1
		position = -1
		for i in range(len(ja)):
			tmpJo = ja[i]
			if maxSize < int(tmpJo['size']):
				maxSize = int(tmpJo['size'])
				position = i

		url = ''
		if len(ja) > 0:
			if position == -1:
				position = 0
			url = ja[position]['url']

		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = {
			"Referer":"https://www.bilibili.com",
			"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
		}
		result["contentType"] = 'video/x-flv'
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
#coding=utf-8
#!/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json
import time
import base64

class Spider(Spider):  # 元类 默认的元类 type
	def getName(self):
		return "哔哩"
	def init(self,extend=""):
		print("============{0}============".format(extend))
		pass
	def isVideoFormat(self,url):
		pass
	def manualVideoCheck(self):
		pass
	def homeContent(self,filter):
		result = {}
		cateManual = {
		    "庄子": "庄子",
		    "论语": "论语",
		    "博通": "博通",
		    "丹道": "丹道",
			"九宫八卦": "九宫八卦",
			"河图洛书": "河图洛书",
			"道德经": "道德经",
			"奇门遁甲": "奇门遁甲",
			"大六壬": "大六壬",
			"梅花易数": "梅花易数",
			"易经": "易经",
			"黄帝内经": "黄帝内经",
			"山海经": "山海经",
			"南华经": "南华经",
			"冲虚经": "冲虚经",
			"文始真经": "文始真经"

		}
		classes = []
		for k in cateManual:
			classes.append({
				'type_name':k,
				'type_id':cateManual[k]
			})
		result['class'] = classes
		if(filter):
			result['filters'] = self.config['filter']
		return result
	def homeVideoContent(self):
		result = {
			'list':[]
		}
		return result
	cookies = ''
	def getCookie(self):
		rsp = self.fetch("https://www.bilibili.com/")
		self.cookies = rsp.cookies
		return rsp.cookies
	def categoryContent(self,tid,pg,filter,extend):
		result = {}
		url = 'https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword={0}&duration=4&page={1}'.format(tid,pg)
		if len(self.cookies) <= 0:
			self.getCookie()
		rsp = self.fetch(url,cookies=self.cookies)
		content = rsp.text
		jo = json.loads(content)
		if jo['code'] != 0:
			rspRetry = self.fetch(url,cookies=self.getCookie())
			content = rspRetry.text
		jo = json.loads(content)
		videos = []
		vodList = jo['data']['result']
		for vod in vodList:
			aid = str(vod['aid']).strip()
			title = vod['title'].strip().replace("","").replace("","")
			img = 'https:' + vod['pic'].strip()
			remark = str(vod['duration']).strip()
			videos.append({
				"vod_id":aid,
				"vod_name":title,
				"vod_pic":img,
				"vod_remarks":remark
			})
		result['list'] = videos
		result['page'] = pg
		result['pagecount'] = 9999
		result['limit'] = 90
		result['total'] = 999999
		return result
	def cleanSpace(self,str):
		return str.replace('\n','').replace('\t','').replace('\r','').replace(' ','')
	def detailContent(self,array):
		aid = array[0]
		url = "https://api.bilibili.com/x/web-interface/view?aid={0}".format(aid)

		rsp = self.fetch(url,headers=self.header)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		title = jo['title'].replace("","").replace("","")
		pic = jo['pic']
		desc = jo['desc']
		typeName = jo['tname']
		vod = {
			"vod_id":aid,
			"vod_name":title,
			"vod_pic":pic,
			"type_name":typeName,
			"vod_year":"",
			"vod_area":"",
			"vod_remarks":"",
			"vod_actor":"",
			"vod_director":"",
			"vod_content":desc
		}
		ja = jo['pages']
		playUrl = ''
		for tmpJo in ja:
			cid = tmpJo['cid']
			part = tmpJo['part']
			playUrl = playUrl + '{0}${1}_{2}#'.format(part,aid,cid)

		vod['vod_play_from'] = 'B站'
		vod['vod_play_url'] = playUrl

		result = {
			'list':[
				vod
			]
		}
		return result
	def searchContent(self,key,quick):
		result = {
			'list':[]
		}
		return result
	def playerContent(self,flag,id,vipFlags):
		# https://www.555dianying.cc/vodplay/static/js/playerconfig.js
		result = {}

		ids = id.split("_")
		url = 'https://api.bilibili.com:443/x/player/playurl?avid={0}&cid=%20%20{1}&qn=112'.format(ids[0],ids[1])
		rsp = self.fetch(url)
		jRoot = json.loads(rsp.text)
		jo = jRoot['data']
		ja = jo['durl']

		maxSize = -1
		position = -1
		for i in range(len(ja)):
			tmpJo = ja[i]
			if maxSize < int(tmpJo['size']):
				maxSize = int(tmpJo['size'])
				position = i

		url = ''
		if len(ja) > 0:
			if position == -1:
				position = 0
			url = ja[position]['url']

		result["parse"] = 0
		result["playUrl"] = ''
		result["url"] = url
		result["header"] = {
			"Referer":"https://www.bilibili.com",
			"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
		}
		result["contentType"] = 'video/x-flv'
		return result

	config = {
		"player": {},
		"filter": {}
	}
	header = {}

	def localProxy(self,param):
		return [200, "video/MP2T", action, ""]


code:
# coding=utf-8
# !/usr/bin/python
import sys
sys.path.append('..')
from base.spider import Spider
import json
import base64
import hashlib

class Spider(Spider):  # 元类 默认的元类 type
    def getName(self):
        return "LeZhuTV"

    def init(self, extend=""):
        print("============{0}============".format(extend))
        pass

    def homeContent(self, filter):
        result = {}
        cateManual = {
            "电影": "1",
            "连续剧": "2",
            "动漫": "4",
            "综艺": "3",
            "韩剧": "14",
            "美剧": "15"
        }
        classes = []
        for k in cateManual:
            classes.append({
                'type_name': k,
                'type_id': cateManual[k]
            })

        result['class'] = classes
        if (filter):
            result['filters'] = self.config['filter']
        return result

    def homeVideoContent(self):
        rsp = self.fetch("http://www.lezhutv.com")
        root = self.html(rsp.text)
        aList = root.xpath("//ul[@class='tbox_m2']/li")
        videos = []
        for a in aList:
            name = a.xpath('.//@title')[0]
            pic = a.xpath('.//@data-original')[0]
            mark = a.xpath(".//span/text()")[0]
            sid = a.xpath(".//@href")[0]
            sid = self.regStr(sid, "/detail/(\\d+).html")
            videos.append({
                "vod_id": sid,
                "vod_name": name,
                "vod_pic": pic,
                "vod_remarks": mark
            })
        result = {
            'list': videos
        }
        return result

    def categoryContent(self, tid, pg, filter, extend):
        result = {}

        ext = extend.get("by","")
        url = 'http://www.lezhutv.com/list/{0}_{1}_desc_{2}_0_0___.html'.format(tid,pg,ext)
        rsp = self.fetch(url)
        root = self.html(rsp.text)
        aList = root.xpath("//ul[@class='tbox_m2']/li")
        videos = []
        for a in aList:
            name = a.xpath('.//@title')[0]
            pic = a.xpath('.//@data-original')[0]
            mark = a.xpath(".//span/text()")[0]
            sid = a.xpath(".//@href")[0]
            sid = self.regStr(sid, "/detail/(\\d+).html")
            videos.append({
                "vod_id": sid,
                "vod_name": name,
                "vod_pic": pic,
                "vod_remarks": mark
            })
        result['list'] = videos
        result['page'] = pg
        result['pagecount'] = 9999
        result['limit'] = 90
        result['total'] = 999999
        return result

    def detailContent(self, array):
        tid = array[0]
        url = 'http://www.lezhutv.com/detail/{0}.html'.format(tid)
        rsp = self.fetch(url)
        root = self.html(rsp.text)
        node = root.xpath(".//div[@class='dbox']")[0]
        nodes = root.xpath(".//div[@class='tbox2']")[0]
        pic = node.xpath(".//div/@data-original")[0]
        title = node.xpath('.//h4/text()')[0]
        detail = nodes.xpath(".//div[@class='tbox_js']/text()")[0]
        yac = node.xpath(".//p[@class='yac']/text()")[0]
        yac = yac.split('/')
        yacs = yac[0].strip()
        type_name = yac[1].strip()
        actor = node.xpath(".//p[@class='act']/text()")[0]
        director = node.xpath(".//p[@class='dir']/text()")[0]

        vod = {
            "vod_id": tid,
            "vod_name": title,
            "vod_pic": pic,
            "type_name": type_name,
            "vod_year": yacs,
            "vod_area": "",
            "vod_remarks": "",
            "vod_actor": actor,
            "vod_director": director,
            "vod_content": detail
        }

        vod_play_from = '$$$'
        playFrom = []
        vodHeader = root.xpath(".//div[@class='tbox2 tabs']/div/h3/text()")
        i=1
        for v in vodHeader:
            playFrom.append("线路" + str(i))
            i = i+1
        vod_play_from = vod_play_from.join(playFrom)
        vod_play_url = '$$$'
        playList = []
        vodList = root.xpath("//div[@class='tbox2 tabs']")

        for vl in vodList:
            vodItems = []
            aList = vl.xpath(".//ul/li/a")
            for tA in aList:
                href = tA.xpath('./@href')[0]
                name = tA.xpath('./text()')[0]
                tId = self.regStr(href, '/play/(\\S+).html')
                vodItems.append(name + "$" + tId)
            joinStr = '#'
            joinStr = joinStr.join(vodItems)
            playList.append(joinStr)
        vod_play_url = vod_play_url.join(playList)
        vod['vod_play_from'] = vod_play_from
        vod['vod_play_url'] = vod_play_url

        result = {
            'list': [
                vod
            ]
        }
        return result

    def searchContent(self, key, quick):
        url = 'http://www.lezhutv.com/search-pg-1-wd-{0}.html'.format(key)
        rsp = self.fetch(url)
        root = self.html(rsp.text)
        seaArray = root.xpath("//ul[@class='tbox_m']/li")
        seaList = []
        for vod in seaArray:
            name = vod.xpath('.//@title')[0]
            pic = vod.xpath('.//@data-original')[0]
            mark = vod.xpath(".//span/text()")[0]
            sid = vod.xpath(".//@href")[0]
            sid = self.regStr(sid, "/detail/(\\d+).html")
            seaList.append({
                "vod_id": sid,
                "vod_name": name,
                "vod_pic": pic,
                "vod_remarks": mark
            })
        result = {
            'list': seaList
        }
        return result

    config = {
        "player":{},
        "filter":{"1":[{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"score"},{"n":"评分","v":"hits"}]}],"2":[{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"score"},{"n":"评分","v":"hits"}]}],"3":[{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"score"},{"n":"评分","v":"hits"}]}],"4":[{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"score"},{"n":"评分","v":"hits"}]}],"14":[{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"score"},{"n":"评分","v":"hits"}]}],"15":[{"key":"by","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"score"},{"n":"评分","v":"hits"}]}]}
    }
    header = {
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36"
    }

    def get_md5(self,value):
        b64 = base64.b64encode((base64.b64encode(value.encode()).decode() + "NTY2").encode()).decode()
        md5 = hashlib.md5(b64.encode()).hexdigest()
        return "".join(char if char.isdigit() else "zyxwvutsrqponmlkjihgfedcba"["abcdefghijklmnopqrstuvwxyz".find(char)] for char in md5)

    def playerContent(self, flag, id, vipFlags):
        result = {}
        url = 'http://www.lezhutv.com/play/{0}.html'.format(id)
        rsp = self.fetch(url)
        root = self.html(rsp.text)
        scripts = root.xpath("//script/text()")
        scripts = scripts[1].replace('\n', '')
        nid = self.regStr(scripts, 'view_path = \'(.*?)\';')

        md5url = 'http://www.lezhutv.com/hls2/index.php?url={0}'.format(nid)
        rsp = self.fetch(md5url)
        root = self.html(rsp.text)
        value = root.xpath(".//input[@id='hdMd5']/@value")
        value = ''.join(value)
        md5s = self.get_md5(str(value))
        data = {
            "id": nid,
            "type": "vid",
            "siteuser": "",
            "md5": md5s,
            "referer": url,
            "hd": "",
            "lg": ""
        }
        payUrl = 'http://www.lezhutv.com/hls2/url.php'
        parseRsp = self.post(payUrl,data,headers=self.header)
        parseRsps = json.loads(parseRsp.text)
        realUrl = parseRsps['media']['url']
        if len(realUrl) > 0:
            result["parse"] = 0
            result["playUrl"] = ""
            result["url"] = realUrl
            result["header"] = ""
        else:
            result["parse"] = 1
            result["playUrl"] = ""
            result["url"] = url
            result["header"] = json.dumps(self.header)
        return result

    def isVideoFormat(self, url):
        pass

    def manualVideoCheck(self):
        pass

    def localProxy(self, param):
        return [200, "video/MP2T", action, ""]