1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

Exclude tv shows from gomostream

This commit is contained in:
James Hawkins 2021-07-20 23:57:25 +01:00
parent d3d0794307
commit 2cff5aeb00

View file

@ -16,6 +16,13 @@ async function findContent(searchTerm, type) {
imdbRes.d.forEach((e) => {
if (!e.id.startsWith('tt')) return;
// Block tv shows
if (e.q === "TV series") return;
if (e.q === "TV mini-series") return;
if (e.q === "video game") return;
if (e.q === "TV movie") return;
if (e.q === "TV special") return;
results.push({
title: e.l,
slug: e.id,
@ -65,6 +72,12 @@ async function getStreamUrl(slug, type, season, episode) {
const parser = new DOMParser();
const site2Dom = parser.parseFromString(site2, "text/html");
console.log(site2Dom.body)
if (site2Dom.body.innerText === "File was deleted")
return { url: '' }
const script = site2Dom.querySelectorAll("script")[8].innerHTML;
let unpacked = unpack(script).split('');