diff --git a/PG/lib/aliproxy.tar.xz b/PG/lib/aliproxy.tar.xz index 1b8f728..ed048ce 100644 Binary files a/PG/lib/aliproxy.tar.xz and b/PG/lib/aliproxy.tar.xz differ diff --git a/PG/lib/aliproxy.tar.xz.md5 b/PG/lib/aliproxy.tar.xz.md5 index ec16962..10cf9a6 100644 --- a/PG/lib/aliproxy.tar.xz.md5 +++ b/PG/lib/aliproxy.tar.xz.md5 @@ -1 +1 @@ -0d98f1e7204165f1c0edd6c45d51140e +37bf4074e1c66975dc9d65296d5ce074 diff --git a/潇洒/api.json b/潇洒/api.json index 13ec8cc..8f7a2f2 100644 --- a/潇洒/api.json +++ b/潇洒/api.json @@ -112,6 +112,21 @@ "ua": "okhttp/3.10.0" } }, + { + "key": "魔方", + "name": "魔方|APP", + "type": 3, + "quickSearch": 1, + "api": "csp_AppGet", + "ext": { + "url": "", + "site": "https://www.snysw.xyz/mfys.txt", + "dataKey": "1234567887654321", + "dataIv": "1234567887654321", + "deviceId": "", + "version": "" + } + }, { "key": "稀饭", "name": "稀饭|APP", @@ -185,21 +200,6 @@ "version": "" } }, - { - "key": "顾我", - "name": "顾我|APP", - "type": 3, - "quickSearch": 1, - "api": "csp_AppGet2", - "ext": { - "url": "", - "site": "https://guwozj-1319364746.cos.ap-guangzhou.myqcloud.com/app.txt", - "dataKey": "ca94b06ca3c7d80e", - "dataIv": "ca94b06ca3c7d80e", - "deviceId": "", - "version": "120" - } - }, { "key": "雄鹰", "name": "雄鹰|APP", @@ -272,34 +272,6 @@ "version": "" } }, - { - "key": "热剧", - "name": "热剧|APP", - "type": 3, - "quickSearch": 1, - "api": "csp_AppGet2", - "ext": { - "url": "", - "site": "https://app-qy.oss-cn-shanghai.aliyuncs.com/rebo.txt", - "dataKey": "8191A7F47B37882F", - "dataIv": "8191A7F47B37882F", - "deviceId": "", - "version": "" - } - }, - { - "key": "码头", - "name": "码头|APP", - "type": 3, - "api": "csp_AppGet", - "ext": { - "url": "https://www.lgmt.cc", - "dataKey": "asfjaskasgggassf", - "dataIv": "asfjaskasgggassf", - "deviceId": "", - "version": "" - } - }, { "key": "米诺", "name": "米诺|APP", @@ -328,20 +300,6 @@ "version": "105" } }, - { - "key": "桃子", - "name": "桃子|APP", - "type": 3, - "quickSearch": 1, - "api": "csp_AppGet", - "ext": { - "url": "https://appcms.tzys.xyz", - "dataKey": "KL6vlZkw6WL5x90U", - "dataIv": "KL6vlZkw6WL5x90U", - "deviceId": "4b4c36766c5a6b7736574c3578393055", - "version": "119" - } - }, { "key": "瓜萌", "name": "瓜萌|APP", @@ -406,27 +364,14 @@ "quickSearch": 1, "api": "csp_AppGet", "ext": { - "url": "https://api1.bffree.cn", + "url": "", + "site": "http://t.bffree.cn/1.txt", "dataKey": "2015692015692015", "dataIv": "2015692015692015", "deviceId": "", "version": "300" } }, - { - "key": "彼岸", - "name": "彼岸|APP", - "type": 3, - "quickSearch": 1, - "api": "csp_AppGet", - "ext": { - "url": "https://mfsp33.top", - "dataKey": "1234567887654321", - "dataIv": "1234567887654321", - "deviceId": "298e5fe29c74b35aabb9836ee2f6f449f", - "version": "315" - } - }, { "key": "雨滴", "name": "雨滴|APP", @@ -484,27 +429,14 @@ } }, { - "key": "在看", - "name": "在看|APP", + "key": "白蛇", + "name": "白蛇|APP", "type": 3, "quickSearch": 1, "api": "csp_AppGet", "ext": { - "url": "http://149.88.64.161:9525", - "dataKey": "123456789ABCDEFG", - "dataIv": "123456789ABCDEFG", - "deviceId": "", - "version": "" - } - }, - { - "key": "星河", - "name": "星河|APP", - "type": 3, - "quickSearch": 1, - "api": "csp_AppGet", - "ext": { - "url": "http://121.62.22.204:9876", + "url": "", + "site": "http://tengxunyunaliyun.oss-cn-shanghai.aliyuncs.com/tengxunyun.txt", "dataKey": "f5e2tx53ykp6s2c9", "dataIv": "f5e2tx53ykp6s2c9", "deviceId": "", @@ -579,19 +511,6 @@ "jxurl": "https://www.ququkan.cc" } }, - { - "key": "火猫", - "name": "火猫|APP", - "type": 3, - "quickSearch": 1, - "api": "csp_AppMuou", - "ext": { - "url": "http://154.12.22.168:14988", - "dataKey": "531f6082a43ac5d7", - "dataIv": "531f6082a43ac5d7", - "jxurl": "http://app.789dd.cn" - } - }, { "key": "哔哩视频", "name": "哔哩|视频", @@ -1107,6 +1026,28 @@ "filterable": 1, "playerType": 2 }, + { + "key": "想看影视", + "name": "想看|影视", + "type": 3, + "api": "./py/想看影视.py", + "searchable": 1, + "changeable": 1, + "quickSearch": 1, + "filterable": 1, + "playerType": 2 + }, + { + "key": "追星影视", + "name": "追星|影视", + "type": 3, + "api": "./py/追星影视.py", + "searchable": 1, + "changeable": 1, + "quickSearch": 1, + "filterable": 1, + "playerType": 2 + }, { "key": "厂长影视", "name": "厂长|影视", @@ -1620,7 +1561,7 @@ "quickSearch": 1, "filterable": 1, "ext": { - "url": "https://www.qwnull.com,https://www.qwmkv.com,https://www.qwfilm.com,https://www.qnmp4.com,https://www.qnnull.com,https://www.qnhot.com" + "url": "https://www.pkmp4.xyz,https://www.qwnull.com,https://www.qwmkv.com,https://www.qwfilm.com,https://www.qnmp4.com,https://www.qnnull.com,https://www.qnhot.com" } }, { diff --git a/潇洒/py/想看影视.py b/潇洒/py/想看影视.py new file mode 100644 index 0000000..2cf1b1c --- /dev/null +++ b/潇洒/py/想看影视.py @@ -0,0 +1,169 @@ +# -*- coding: utf-8 -*- +# by @嗷呜 +import re +import sys +from Crypto.Hash import MD5 +sys.path.append("..") +import json +import time +from pyquery import PyQuery as pq +from base.spider import Spider + + +class Spider(Spider): + + def init(self, extend=""): + pass + + def getName(self): + pass + + def isVideoFormat(self, url): + pass + + def manualVideoCheck(self): + pass + + def action(self, action): + pass + + def destroy(self): + pass + + host = 'https://www.lreeok.vip' + + headers = { + 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36', + 'Accept': 'application/json, text/javascript, */*; q=0.01', + 'sec-ch-ua-platform': '"macOS"', + 'sec-ch-ua': '"Not/A)Brand";v="8", "Chromium";v="134", "Google Chrome";v="134"', + 'Origin': host, + 'Referer': f"{host}/", + } + + def homeContent(self, filter): + data = self.getpq(self.fetch(self.host, headers=self.headers).text) + result = {} + classes = [] + for k in data('.head-more.box a').items(): + i = k.attr('href') + if i and '/vod' in i: + classes.append({ + 'type_name': k.text(), + 'type_id': re.search(r'\d+', i).group(0) + }) + result['class'] = classes + result['list'] = self.getlist(data('.border-box.diy-center .public-list-div')) + return result + + def homeVideoContent(self): + pass + + def categoryContent(self, tid, pg, filter, extend): + body = {'type': tid, 'class': '', 'area': '', 'lang': '', 'version': '', 'state': '', 'letter': '', 'page': pg} + data = self.post(f"{self.host}/index.php/api/vod", headers=self.headers, data=self.getbody(body)).json() + result = {} + result['list'] = data['list'] + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + + def detailContent(self, ids): + data = self.getpq(self.fetch(f"{self.host}/voddetail/{ids[0]}.html", headers=self.headers).text) + v = data('.detail-info.lightSpeedIn .slide-info') + vod = { + 'vod_year': v.eq(-1).text(), + 'vod_remarks': v.eq(0).text(), + 'vod_actor': v.eq(3).text(), + 'vod_director': v.eq(2).text(), + 'vod_content': data('.switch-box #height_limit').text() + } + np = data('.anthology.wow.fadeInUp') + ndata = np('.anthology-tab .swiper-wrapper .swiper-slide') + pdata = np('.anthology-list .anthology-list-box ul') + play, names = [], [] + for i in range(len(ndata)): + n = ndata.eq(i)('a') + n('span').remove() + names.append(n.text()) + vs = [] + for v in pdata.eq(i)('li').items(): + vs.append(f"{v.text()}${v('a').attr('href')}") + play.append('#'.join(vs)) + vod["vod_play_from"] = "$$$".join(names) + vod["vod_play_url"] = "$$$".join(play) + result = {"list": [vod]} + return result + + def searchContent(self, key, quick, pg="1"): + # data = self.getpq(self.fetch(f"{self.host}/vodsearch/{key}----------{pg}---.html", headers=self.headers).text) + # return {'list': self.getlist(data('.row-right .search-box .public-list-bj')), 'page': pg} + data = self.fetch( + f"{self.host}/index.php/ajax/suggest?mid={pg}&wd={key}&limit=999×tamp={int(time.time() * 1000)}", + headers=self.headers).json() + videos = [] + for i in data['list']: + videos.append({ + 'vod_id': i['id'], + 'vod_name': i['name'], + 'vod_pic': i['pic'] + }) + return {'list': videos, 'page': pg} + + def playerContent(self, flag, id, vipFlags): + h, p = {"User-Agent": "okhttp/3.14.9"}, 1 + url = f"{self.host}{id}" + data = self.getpq(self.fetch(url, headers=self.headers).text) + try: + jstr = data('.player .player-left script').eq(0).text() + jsdata = json.loads(jstr.split('aaa=')[-1]) + body = {'url': jsdata['url']} + if not re.search(r'\.m3u8|\.mp4', body['url']): + data = self.post(f"{self.host}/okplay/api_config.php", headers=self.headers, + data=self.getbody(body)).json() + url = data.get('url') or data.get('data', {}).get('url') + p = 0 + except Exception as e: + print('错误信息:', e) + pass + result = {} + result["parse"] = p + result["url"] = url + result["header"] = h + return result + + def localProxy(self, param): + pass + + def getbody(self, params): + t = int(time.time()) + h = MD5.new() + h.update(f"DS{t}DCC147D11943AF75".encode('utf-8')) + key = h.hexdigest() + params.update({'time': t, 'key': key}) + return params + + def getlist(self, data): + videos = [] + for i in data.items(): + id = i('a').attr('href') + if id: + id = re.search(r'\d+', id).group(0) + img = i('img').attr('data-src') + if img and 'url=' in img: img = f'{self.host}{img}' + videos.append({ + 'vod_id': id, + 'vod_name': i('img').attr('alt'), + 'vod_pic': img, + 'vod_remarks': i('.public-prt').text() or i('.public-list-prb').text() + }) + return videos + + def getpq(self, data): + try: + return pq(data) + except Exception as e: + print(f"{str(e)}") + return pq(data.encode('utf-8')) diff --git a/潇洒/py/追星影视.py b/潇洒/py/追星影视.py new file mode 100644 index 0000000..8f00cac --- /dev/null +++ b/潇洒/py/追星影视.py @@ -0,0 +1,182 @@ +# -*- coding: utf-8 -*- +# by @嗷呜 +import json +import random +import string +import sys +from base64 import b64decode, b64encode +from urllib.parse import quote, unquote +sys.path.append('..') +import concurrent.futures +from base.spider import Spider + + +class Spider(Spider): + + def init(self, extend=""): + pass + + def getName(self): + pass + + def isVideoFormat(self, url): + pass + + def manualVideoCheck(self): + pass + + def destroy(self): + pass + + host='https://xy.51gy.top' + + headers = { + 'User-Agent': 'okhttp/4.9.1', + 'mark-time': 'null', + 'fn-api-version': '3.1.9', + 'versionCode': '19', + 'product': 'gysg', + 'sg': '22664e555e0015684f988833803b3055', + } + + def homeContent(self, filter): + data=self.fetch(f"{self.host}/api.php/vod/type", headers=self.headers).json() + result,filters,videos = {},{},[] + classes = [{'type_id': i['type_name'], 'type_name': i['type_name']} for i in data['list'][1:]] + body={'token':'', 'type_id':data['list'][0]['type_id']} + ldata=self.post(f"{self.host}/api.php/vod/category", data=body, headers=self.headers).json() + for i in ldata['data']['banner']: + videos.append({ + 'vod_id':i.get('vod_id'), + 'vod_name':i.get('vod_name'), + 'vod_pic':i.get('vod_pic_thumb') + }) + with concurrent.futures.ThreadPoolExecutor(max_workers=len(classes)) as executor: + future_to_aid = {executor.submit(self.fts, aid): aid for aid in classes} + for future in concurrent.futures.as_completed(future_to_aid): + aid = future_to_aid[future] + try: + aid_id, fts = future.result() + filters[aid_id] = fts + except Exception as e: + print(f"Error processing aid {aid}: {e}") + result['class'] = classes + result['filters'] = filters + result['list'] = videos + return result + + def homeVideoContent(self): + pass + + def categoryContent(self, tid, pg, filter, extend): + params={'state':extend.get('state',tid) or tid,'class':extend.get('classes','全部'),'area':extend.get('area','全部'),'year':extend.get('year','全部'),'lang':extend.get('lang','全部'),'version':extend.get('version','全部'),'pg':pg} + data=self.fetch(f"{self.host}/api.php/vod/list", params=params, headers=self.headers).json() + result = {} + videos = [] + for i in data['data']['list']: + if str(i.get('vod_id', 0)) != '0': + videos.append({ + 'vod_id': i.get('vod_id'), + 'vod_name': i.get('vod_name'), + 'vod_pic': i.get('vod_pic'), + 'vod_year': f"{i.get('vod_score')}分", + 'vod_remarks': i.get('vod_remarks') + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + + def detailContent(self, ids): + body={'ids':ids[0],'uni_code':self.getunc(),'ac':'detail','token':''} + data=self.post(f"{self.host}/api.php/vod/detail2", data=body, headers=self.headers).json() + v=data['data'] + vod = { + 'type_name': v.get('type_name'), + 'vod_year': v.get('vod_year'), + 'vod_area': v.get('vod_area'), + 'vod_lang': v.get('vod_lang'), + 'vod_remarks': v.get('vod_remarks'), + 'vod_actor': v.get('vod_actor'), + 'vod_director': v.get('vod_director'), + 'vod_content': v.get('vod_content') + } + n,p=[],[] + for i in v['vod_play_list']: + pp=i['player_info'] + n.append(pp['show']) + np=[] + for j in i['urls']: + cd={'parse':pp.get('parse'),'url':j['url'],'headers':pp.get('headers')} + np.append(f"{j['name']}${self.e64(json.dumps(cd))}") + p.append('#'.join(np)) + vod.update({'vod_play_from':'$$$'.join(n),'vod_play_url':'$$$'.join(p)}) + return {'list':[vod]} + + def searchContent(self, key, quick, pg="1"): + data=self.fetch(f"{self.host}/api.php/vod/search", params={'keywords':key,'type':'1','pg':pg}, headers=self.headers).json() + return {'list':data['list'],'page':pg} + + def playerContent(self, flag, id, vipFlags): + ids=json.loads(self.d64(id)) + headers = {} + urls=ids['url'] + if ids.get('headers'): + hs=ids['headers'].split('=>',1) + headers[hs[0].strip()]=hs[-1].strip() + if isinstance(ids.get('parse'), list) and len(ids['parse']) > 0: + urls=[] + for i,x in enumerate(ids['parse']): + su=f"{self.getProxyUrl()}&url={quote(x+ids['url'])}" + urls.extend([f'解析{i+1}',su]) + return {'parse': 0, 'url': urls, 'header': headers} + + def localProxy(self, param): + try: + body = {'url':unquote(param['url'])} + data=self.post(f"{self.host}/api.php/vod/m_jie_xi", data=body, headers=self.headers).json() + url=data.get('url') or data['data'].get('url') + return [302,'video/MP2T',None,{'Location':url}] + except: + return [] + + def liveContent(self, url): + pass + + def fts(self, tdata): + params={'state':tdata['type_id'],'pg':'1'} + data = self.fetch(f"{self.host}/api.php/vod/list", params=params, headers=self.headers).json() + ftks = ["classes", "area", "lang", "year", "version", "state"] + filter = [ + { + 'name': k, + 'key': k, + 'value': [{'n': i, 'v': i} for i in v.split(',')] + } + for k, v in data['data']['classes']["type_extend"].items() + if k in ftks and v + ] + return tdata['type_id'],filter + + def getunc(self): + chars = string.ascii_lowercase + string.digits + data = ''.join(random.choice(chars) for _ in range(16)) + return self.e64(data) + + def e64(self, text): + try: + text_bytes = text.encode('utf-8') + encoded_bytes = b64encode(text_bytes) + return encoded_bytes.decode('utf-8') + except Exception as e: + return "" + + def d64(self,encoded_text): + try: + encoded_bytes = encoded_text.encode('utf-8') + decoded_bytes = b64decode(encoded_bytes) + return decoded_bytes.decode('utf-8') + except Exception as e: + return "" \ No newline at end of file diff --git a/潇洒/spider.jar b/潇洒/spider.jar index 4ace16b..117fd69 100644 Binary files a/潇洒/spider.jar and b/潇洒/spider.jar differ