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

@@ -6,7 +6,7 @@ This is the main entrypoint of the library. It is recommended to make one instan
## Example
```ts
import { targets, makeProviders, makeDefaultFetcher } from "@movie-web/providers";
import { targets, makeProviders, makeDefaultFetcher } from '@movie-web/providers';
const providers = makeProviders({
fetcher: makeDefaultFetcher(fetch),

View File

@@ -9,9 +9,9 @@ You can attach events if you need to know what is going on while its processing.
// media from TMDB
const media = {
type: 'movie',
title: "Hamilton",
title: 'Hamilton',
releaseYear: 2020,
tmdbId: "556574"
tmdbId: '556574'
}
// scrape a stream

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');
}
```

View File

@@ -5,7 +5,7 @@ Run a specific embed scraper and get its outputted streams.
## Example
```ts
import { SourcererOutput } from "@movie-web/providers";
import { SourcererOutput } from '@movie-web/providers';
// scrape a stream from upcloud
let output: EmbedOutput;
@@ -15,7 +15,7 @@ try {
url: 'https://example.com/123',
})
} catch (err) {
console.log("failed to scrape")
console.log('failed to scrape')
return;
}

View File

@@ -5,7 +5,7 @@ Make a fetcher from a `fetch()` API. It is used for making a instance of provide
## Example
```ts
import { targets, makeProviders, makeDefaultFetcher } from "@movie-web/providers";
import { targets, makeProviders, makeDefaultFetcher } from '@movie-web/providers';
const providers = makeProviders({
fetcher: makeStandardFetcher(fetch),

View File

@@ -5,9 +5,9 @@ Make a fetcher to use with [movie-web/simple-proxy](https://github.com/movie-web
## Example
```ts
import { targets, makeProviders, makeDefaultFetcher, makeSimpleProxyFetcher } from "@movie-web/providers";
import { targets, makeProviders, makeDefaultFetcher, makeSimpleProxyFetcher } from '@movie-web/providers';
const proxyUrl = "https://your.proxy.workers.dev/"
const proxyUrl = 'https://your.proxy.workers.dev/'
const providers = makeProviders({
fetcher: makeDefaultFetcher(fetch),