mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-29 16:07:40 +01:00
Exclude tv shows from gomostream
This commit is contained in:
parent
d3d0794307
commit
2cff5aeb00
1 changed files with 13 additions and 0 deletions
|
@ -16,6 +16,13 @@ async function findContent(searchTerm, type) {
|
||||||
imdbRes.d.forEach((e) => {
|
imdbRes.d.forEach((e) => {
|
||||||
if (!e.id.startsWith('tt')) return;
|
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({
|
results.push({
|
||||||
title: e.l,
|
title: e.l,
|
||||||
slug: e.id,
|
slug: e.id,
|
||||||
|
@ -65,6 +72,12 @@ async function getStreamUrl(slug, type, season, episode) {
|
||||||
|
|
||||||
const parser = new DOMParser();
|
const parser = new DOMParser();
|
||||||
const site2Dom = parser.parseFromString(site2, "text/html");
|
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;
|
const script = site2Dom.querySelectorAll("script")[8].innerHTML;
|
||||||
|
|
||||||
let unpacked = unpack(script).split('');
|
let unpacked = unpack(script).split('');
|
||||||
|
|
Loading…
Reference in a new issue