mirror of
https://github.com/Inside4ndroid/TMDB-Embed-API.git
synced 2026-10-22 09:35:11 +00:00
debug test
This commit is contained in:
+12
-1
@@ -109,8 +109,19 @@ async function episode(data_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function getmovie(id) {
|
export async function getmovie(id) {
|
||||||
|
|
||||||
let resp = await (await fetch(`https://vidsrc.to/embed/movie/${id}`)).text();
|
let resp = await (await fetch(`https://vidsrc.to/embed/movie/${id}`)).text();
|
||||||
let data_id = (/data-id="(.*?)"/g).exec(resp)[1];
|
|
||||||
|
// Validate the response content
|
||||||
|
console.log(resp);
|
||||||
|
|
||||||
|
const match = (/data-id="(.*?)"/g).exec(resp);
|
||||||
|
|
||||||
|
if (!match) {
|
||||||
|
throw new Error('Failed to extract data-id from response');
|
||||||
|
}
|
||||||
|
|
||||||
|
let data_id = match[1];
|
||||||
return episode(data_id);
|
return episode(data_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user