This commit is contained in:
mrjvs
2023-12-29 17:47:49 +01:00
parent a1e172125c
commit cd7368d980
10 changed files with 18 additions and 18 deletions

View File

@@ -5,14 +5,14 @@ Run a specific source scraper and get its outputted streams.
## Example
```ts
import { SourcererOutput, NotFoundError } from "@movie-web/providers";
import { SourcererOutput, NotFoundError } from '@movie-web/providers';
// media from TMDB
const media = {
type: 'movie',
title: "Hamilton",
title: 'Hamilton',
releaseYear: 2020,
tmdbId: "556574"
tmdbId: '556574'
}
// scrape a stream from flixhq
@@ -24,15 +24,15 @@ try {
})
} catch (err) {
if (err instanceof NotFoundError) {
console.log("source doesnt have this media");
console.log('source doesnt have this media');
} else {
console.log("failed to scrape")
console.log('failed to scrape')
}
return;
}
if (!output.stream && output.embeds.length === 0) {
console.log("no streams found");
console.log('no streams found');
}
```