mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-29 16:07:40 +01:00
Fixes
This commit is contained in:
parent
ce571326e7
commit
c16374d5c8
1 changed files with 4 additions and 4 deletions
|
@ -62,9 +62,9 @@ async function getEpisodes(slug) {
|
|||
let seasons = [];
|
||||
let episodes = [];
|
||||
|
||||
for (let i = 0; i < sNodes.length; i++) {
|
||||
const text = sNodes[i].querySelector('div > section > div > div > div > h2 > a').textContent;
|
||||
if (!text.includes('Season')) return;
|
||||
for (let s of sNodes) {
|
||||
const text = s.querySelector('div > section > div > div > div > h2 > a').textContent;
|
||||
if (!text.includes('Season')) continue;
|
||||
|
||||
const season = text.split(' ')[1];
|
||||
|
||||
|
@ -80,7 +80,7 @@ async function getEpisodes(slug) {
|
|||
const epNodes = Array.from(new DOMParser().parseFromString(epRes, 'text/html').querySelectorAll('div.episode_list > div.card'));
|
||||
epNodes.forEach((e, i) => episodes[season].push(++i));
|
||||
}
|
||||
|
||||
|
||||
return { seasons, episodes };
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue