mirror of
https://github.com/p-stream/providers.git
synced 2026-04-21 17:52:18 +00:00
Update streamtape.ts
This commit is contained in:
parent
afefd18a40
commit
41e70c012f
1 changed files with 7 additions and 1 deletions
|
|
@ -20,7 +20,13 @@ function embed(provider: { id: string; name: string; rank: number }) {
|
||||||
name: provider.name,
|
name: provider.name,
|
||||||
rank: provider.rank,
|
rank: provider.rank,
|
||||||
async scrape(ctx) {
|
async scrape(ctx) {
|
||||||
const embedHtml = await ctx.proxiedFetcher<string>(ctx.url);
|
const response = await fetch(ctx.url, {
|
||||||
|
headers: {
|
||||||
|
Accept: 'text/html',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const embedHtml = await response.text();
|
||||||
|
|
||||||
const match = embedHtml.match(/robotlink'\).innerHTML = (.*)'/);
|
const match = embedHtml.match(/robotlink'\).innerHTML = (.*)'/);
|
||||||
if (!match) throw new Error('No match found');
|
if (!match) throw new Error('No match found');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue