Sync all projects
This commit is contained in:
@@ -740,6 +740,12 @@
|
||||
"type": 3,
|
||||
"api": "https://ghfast.top/https://raw.githubusercontent.com/FGBLH/HKL/refs/heads/main/py/黑料不打烊.py"
|
||||
},
|
||||
{
|
||||
"key": "wyt",
|
||||
"name": "🐬五月天.py|🔞[成人]",
|
||||
"type": 3,
|
||||
"api": "https://ghfast.top/https://raw.githubusercontent.com/FGBLH/HKL/refs/heads/main/py/五月天.py"
|
||||
},
|
||||
{
|
||||
"key": "jptt",
|
||||
"name": "🐬禁片天堂.py|🔞[成人]",
|
||||
|
||||
@@ -341,6 +341,12 @@
|
||||
"type": 3,
|
||||
"api": "https://ghfast.top/https://raw.githubusercontent.com/FGBLH/HKL/refs/heads/main/py/黑料不打烊.py"
|
||||
},
|
||||
{
|
||||
"key": "wyt",
|
||||
"name": "🐬五月天.py|🔞[成人]",
|
||||
"type": 3,
|
||||
"api": "https://ghfast.top/https://raw.githubusercontent.com/FGBLH/HKL/refs/heads/main/py/五月天.py"
|
||||
},
|
||||
{
|
||||
"key": "jptt",
|
||||
"name": "🐬禁片天堂.py|🔞[成人]",
|
||||
|
||||
+6
-10
@@ -550,16 +550,6 @@
|
||||
"type": 3,
|
||||
"api": "https://ghfast.top/https://raw.githubusercontent.com/FGBLH/HKL/refs/heads/main/py/短剧聚合.py"
|
||||
},
|
||||
{
|
||||
"key":"kuwo",
|
||||
"name":"🐬酷我听书",
|
||||
"type":1,
|
||||
"api":"http:\/\/xiaobaibai.feng1210.top\/algorith\/music\/kuwo_source.php",
|
||||
"searchable":1,
|
||||
"quickSearch":1,
|
||||
"playUrl":"json:http:\/\/xiaobaibai.feng1210.top\/\/jiexi.php?data=f73a15dd14154af516e867855a58f417&url=",
|
||||
"changeable":1
|
||||
},
|
||||
{
|
||||
"key": "shjb",
|
||||
"name": "🐬色播聚合.py|🔞",
|
||||
@@ -656,6 +646,12 @@
|
||||
"type": 3,
|
||||
"api": "https://ghfast.top/https://raw.githubusercontent.com/FGBLH/HKL/refs/heads/main/py/黑料不打烊.py"
|
||||
},
|
||||
{
|
||||
"key": "wyt",
|
||||
"name": "🐬五月天.py|🔞",
|
||||
"type": 3,
|
||||
"api": "https://ghfast.top/https://raw.githubusercontent.com/FGBLH/HKL/refs/heads/main/py/五月天.py"
|
||||
},
|
||||
{
|
||||
"key": "jptt",
|
||||
"name": "🐬禁片天堂.py|🔞",
|
||||
|
||||
@@ -323,6 +323,12 @@
|
||||
"type": 3,
|
||||
"api": "https://ghfast.top/https://raw.githubusercontent.com/FGBLH/HKL/refs/heads/main/py/今日看料.py"
|
||||
},
|
||||
{
|
||||
"key": "wyt",
|
||||
"name": "🐬五月天.py|🔞",
|
||||
"type": 3,
|
||||
"api": "https://ghfast.top/https://raw.githubusercontent.com/FGBLH/HKL/refs/heads/main/py/五月天.py"
|
||||
},
|
||||
{
|
||||
"key": "jptt",
|
||||
"name": "🐬禁片天堂.py|🔞",
|
||||
|
||||
+183
@@ -0,0 +1,183 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
import re
|
||||
import sys
|
||||
from base.spider import Spider
|
||||
from pyquery import PyQuery as pq
|
||||
|
||||
class Spider(Spider):
|
||||
def init(self, extend=""):
|
||||
self.host = "https://qswyt4444.com"
|
||||
self.headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
||||
'Referer': f'{self.host}/',
|
||||
'Accept-Language': 'zh-CN,zh;q=0.9',
|
||||
}
|
||||
|
||||
def getName(self):
|
||||
return "QS五月天"
|
||||
|
||||
def isVideoFormat(self, url):
|
||||
return url.lower().endswith('.m3u8')
|
||||
|
||||
def manualVideoCheck(self):
|
||||
return True
|
||||
|
||||
def destroy(self):
|
||||
pass
|
||||
|
||||
def homeContent(self, filter):
|
||||
result = {}
|
||||
classes = []
|
||||
seen_ids = set()
|
||||
try:
|
||||
res = self.fetch(self.host, headers=self.headers)
|
||||
d = pq(res.text)
|
||||
items = d('a[href^="/movie/block/"]')
|
||||
for item in items.items():
|
||||
href = item.attr('href')
|
||||
match = re.search(r'/movie/block/(\d+)', href)
|
||||
if match:
|
||||
tid = match.group(1)
|
||||
name = item.text().strip() or item.find('span').text().strip()
|
||||
if tid and name and tid not in seen_ids:
|
||||
classes.append({'type_name': name, 'type_id': tid})
|
||||
seen_ids.add(tid)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if not classes:
|
||||
cateManual = {
|
||||
"最新": "newest",
|
||||
"国产": "50",
|
||||
"淫荡少妇": "21",
|
||||
"人妻诱惑": "22",
|
||||
"大奶萝莉": "23",
|
||||
"丝袜制服": "24",
|
||||
"强奸": "45",
|
||||
"群P": "46"
|
||||
}
|
||||
for k, v in cateManual.items():
|
||||
classes.append({'type_name': k, 'type_id': v})
|
||||
|
||||
result['class'] = classes
|
||||
result['filters'] = {}
|
||||
return result
|
||||
|
||||
def homeVideoContent(self):
|
||||
try:
|
||||
res = self.fetch(self.host, headers=self.headers)
|
||||
return {'list': self.parse_list(res.text)}
|
||||
except Exception:
|
||||
return {'list': []}
|
||||
|
||||
def categoryContent(self, tid, pg, filter, extend):
|
||||
result = {}
|
||||
if tid.isdigit():
|
||||
url = f'{self.host}/movie/block/{tid}?page={pg}'
|
||||
else:
|
||||
url = f'{self.host}/movie/{tid}?page={pg}'
|
||||
try:
|
||||
res = self.fetch(url, headers=self.headers)
|
||||
result['list'] = self.parse_list(res.text)
|
||||
result['page'] = int(pg)
|
||||
result['pagecount'] = 999
|
||||
result['limit'] = 20
|
||||
result['total'] = 9999
|
||||
except Exception:
|
||||
result['list'] = []
|
||||
return result
|
||||
|
||||
def detailContent(self, ids):
|
||||
tid = ids[0]
|
||||
url = tid if tid.startswith('http') else (f'{self.host}{tid}' if tid.startswith('/') else f'{self.host}/movie/detail/{tid}')
|
||||
res = self.fetch(url, headers=self.headers)
|
||||
content = res.text
|
||||
title = ""
|
||||
pic = ""
|
||||
|
||||
title_match = re.search(r'<meta property="og:title" content="(.*?)">', content)
|
||||
if title_match:
|
||||
title = title_match.group(1).split(' - ')[0]
|
||||
|
||||
pic_match = re.search(r'<meta property="og:image" content="(.*?)">', content)
|
||||
if pic_match:
|
||||
pic = pic_match.group(1)
|
||||
|
||||
vod_play_from_list = []
|
||||
vod_play_url_list = []
|
||||
pat = r'(/api/m3u8/p/[a-zA-Z0-9]+\.m3u8)'
|
||||
matches = re.findall(pat, content)
|
||||
unique_urls = []
|
||||
seen = set()
|
||||
|
||||
for m in matches:
|
||||
full_url = m if m.startswith('http') else f"{self.host}{m}"
|
||||
if full_url not in seen:
|
||||
seen.add(full_url)
|
||||
unique_urls.append(full_url)
|
||||
|
||||
for index, u in enumerate(unique_urls):
|
||||
vod_play_from_list.append(f"线路{index + 1}")
|
||||
vod_play_url_list.append(u)
|
||||
|
||||
vod = {
|
||||
'vod_id': tid,
|
||||
'vod_name': title,
|
||||
'vod_pic': pic,
|
||||
'type_name': '',
|
||||
'vod_year': '',
|
||||
'vod_area': '',
|
||||
'vod_remarks': '',
|
||||
'vod_actor': '',
|
||||
'vod_director': '',
|
||||
'vod_content': '',
|
||||
'vod_play_from': '$$$'.join(vod_play_from_list),
|
||||
'vod_play_url': '$$$'.join(vod_play_url_list)
|
||||
}
|
||||
return {'list': [vod]}
|
||||
|
||||
def searchContent(self, key, quick, pg="1"):
|
||||
url = f'{self.host}/search/{key}?page={pg}'
|
||||
try:
|
||||
res = self.fetch(url, headers=self.headers)
|
||||
return {'list': self.parse_list(res.text)}
|
||||
except:
|
||||
return {'list': []}
|
||||
|
||||
def playerContent(self, flag, id, vipFlags):
|
||||
return {
|
||||
'parse': 0,
|
||||
'url': id,
|
||||
'header': {
|
||||
'User-Agent': self.headers['User-Agent']
|
||||
}
|
||||
}
|
||||
|
||||
def localProxy(self, param):
|
||||
pass
|
||||
|
||||
def parse_list(self, html):
|
||||
videos = []
|
||||
d = pq(html)
|
||||
items = d('a[href^="/movie/detail/"]')
|
||||
seen_ids = set()
|
||||
for item in items.items():
|
||||
href = item.attr('href')
|
||||
if href in seen_ids:
|
||||
continue
|
||||
title = item.attr('title')
|
||||
if not title:
|
||||
title = item.find('span').text() or item.text()
|
||||
img_tag = item.find('img')
|
||||
pic = img_tag.attr('data-src') or img_tag.attr('src') or ""
|
||||
remarks = item.find('.duration').text()
|
||||
if href and title:
|
||||
seen_ids.add(href)
|
||||
videos.append({
|
||||
'vod_id': href,
|
||||
'vod_name': title.strip(),
|
||||
'vod_pic': pic,
|
||||
'vod_remarks': remarks
|
||||
})
|
||||
return videos
|
||||
Reference in New Issue
Block a user