Merge branch 'source/theflix'

This commit is contained in:
James Hawkins 2021-12-30 21:01:27 +00:00
commit 8e7b2d38ea

View File

@ -62,9 +62,9 @@ async function getEpisodes(slug) {
let seasons = []; let seasons = [];
let episodes = []; let episodes = [];
for (let i = 0; i < sNodes.length; i++) { for (let s of sNodes) {
const text = sNodes[i].querySelector('div > section > div > div > div > h2 > a').textContent; const text = s.querySelector('div > section > div > div > div > h2 > a').textContent;
if (!text.includes('Season')) return; if (!text.includes('Season')) continue;
const season = text.split(' ')[1]; const season = text.split(' ')[1];