From 484bd2dbc28aeec6d818d49f21bf693e9dcbfe7f Mon Sep 17 00:00:00 2001 From: JMcrafter26 <77780772+JMcrafter26@users.noreply.github.com> Date: Thu, 29 Jan 2026 22:44:03 +0100 Subject: [PATCH] fix: Update s.to source to support new site structure and improve episode extraction --- s.to/sToEngDub.json | 7 +- s.to/sToEngDub_v2.js | 336 +++++++++++++++++++++++++------------------ s.to/sToGerDub.json | 7 +- s.to/sToGerDub_v2.js | 336 +++++++++++++++++++++++++------------------ 4 files changed, 402 insertions(+), 284 deletions(-) diff --git a/s.to/sToEngDub.json b/s.to/sToEngDub.json index ebac88e..63672a3 100644 --- a/s.to/sToEngDub.json +++ b/s.to/sToEngDub.json @@ -2,10 +2,11 @@ "sourceName": "s.to (ENG DUB)", "iconUrl": "https://git.luna-app.eu/50n50/sources/raw/branch/main/s.to/sto.png", "author": { - "name": "Cufiy", - "icon": "https://files.catbox.moe/ttj4fc.gif" + "name": "Cufiy & Hamzo", + "icon": "https://files.catbox.moe/ttj4fc.gif", + "url": "https://github.com/JMcrafter26" }, - "version": "0.3.17", + "version": "0.4.0", "language": "English (DUB)", "streamType": "HLS", "quality": "720p", diff --git a/s.to/sToEngDub_v2.js b/s.to/sToEngDub_v2.js index 66a7e75..3d6bef3 100644 --- a/s.to/sToEngDub_v2.js +++ b/s.to/sToEngDub_v2.js @@ -5,19 +5,71 @@ async function searchResults(keyword) { try { const encodedKeyword = encodeURIComponent(keyword); - const searchApiUrl = `https://s.to/ajax/seriesSearch?keyword=${encodedKeyword}`; + const searchApiUrl = `https://s.to/suche?term=${encodedKeyword}`; const response = await soraFetch(searchApiUrl); - const responseText = await response?.text() ?? response; + const text = response.text ? await response.text() : await response; - const data = await JSON.parse(responseText); + // parse html + /*
(.*?)<\/p>/s; - const aliasesRegex = /