From a701d3c38ac3aef5ddd1d0527d4383551e1d451d Mon Sep 17 00:00:00 2001 From: qist <87984115@qq.com> Date: Thu, 21 May 2026 17:21:10 +0800 Subject: [PATCH] fix --- py/libvio.py | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/py/libvio.py b/py/libvio.py index b2537f04..33d18c8a 100644 --- a/py/libvio.py +++ b/py/libvio.py @@ -446,6 +446,9 @@ class Spider(Spider): play_from_list.append(source_name) ep_urls = [] for netdisk_url, text in netdisk_items: + netdisk_url = (netdisk_url or '').strip() + if netdisk_url.startswith('//'): + netdisk_url = 'https:' + netdisk_url ep_name = text.strip() if text.strip() else '网盘下载' ep_urls.append(f"{ep_name}${netdisk_url}") play_url_list.append('#'.join(ep_urls)) @@ -473,9 +476,28 @@ class Spider(Spider): def playerContent(self, flag, id, vipFlags): try: + if isinstance(id, str): + id = id.strip() + if id.startswith('//'): + id = 'https:' + id + if id.startswith('magnet:') or id.startswith('thunder:') or id.startswith('ed2k:'): + return { + "parse": 1, + "url": id, + "header": dict(self.header), + "playUrl": "" + } + if id.startswith('http') and not id.startswith(self.host): + return { + "parse": 1, + "url": id, + "header": dict(self.header), + "playUrl": "" + } + resp = self._safe_get(id) if not resp or resp.status_code != 200: - return {"parse": 1, "url": id} + return {"parse": 1, "url": id, "header": dict(self.header), "playUrl": ""} html = resp.text player_match = re.search(r'var player_aaaa=(\{[^}]+\})', html) @@ -504,10 +526,10 @@ class Spider(Spider): except: pass - return {"parse": 1, "url": id} + return {"parse": 1, "url": id, "header": dict(self.header), "playUrl": ""} except Exception as e: print(f"Error in playerContent: {str(e)}") - return {"parse": 1, "url": id} + return {"parse": 1, "url": id, "header": dict(self.header), "playUrl": ""} def localProxy(self, param): return None