Delete src/dev-cli/browser directory

This commit is contained in:
Captain Jack Sparrow 2024-05-02 21:58:38 -04:00 committed by GitHub
parent ead928c5d0
commit ff3ceecc37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 29 deletions

View File

@ -1 +0,0 @@
dist

View File

@ -1,11 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Scraper CLI</title>
</head>
<body>
<script src="./index.ts" type="module"></script>
</body>
</html>

View File

@ -1,17 +0,0 @@
import { makeProviders, makeSimpleProxyFetcher, makeStandardFetcher, targets } from '../../../lib';
(window as any).scrape = (proxyUrl: string, type: 'source' | 'embed', input: any) => {
const providers = makeProviders({
fetcher: makeStandardFetcher(fetch),
target: targets.BROWSER,
proxiedFetcher: makeSimpleProxyFetcher(proxyUrl, fetch),
});
if (type === 'source') {
return providers.runSourceScraper(input);
}
if (type === 'embed') {
return providers.runEmbedScraper(input);
}
throw new Error('Input input type');
};