@tomsfactory/bot@3.4.0Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
tomsfactory/botno description
This package works with Deno
JSR Score
100%
Published
10 months ago (3.4.0)
@tomsfactory/bot
Uses Deno 2 (canary).
This needs canary because otherwise we get the error
Warning: Not implemented: ClientRequest.options.createConnection. See
this issue.
You can update deno by:
deno upgrade canary
It uses rebrowser-puppeteer as the default browser to avoid bot detection.
Getting started using this package
- Install the package with
deno add jsr:@tomsfactory/bot - Import the symbol you want in to your repository and use:
import { forceOpenAllShadowDoms } from '@tomsfactory/bot/shadow-root'; import { BrowserLauncher } from '@tomsfactory/bot/puppeteer'; import type { Browser, Page } from 'npm:rebrowser-puppeteer-core'; const launcher = new BrowserLauncher(); const browser: Browser = await launcher.launch(); const page: Page = await browser.page(); await forceOpenAllShadowDoms(page);
Development workflow
- If it's the first time you're working in this repo on your current machine,
install the git hooks with
./scripts/add-git-hooks.sh. You will also need to create a .env file like socp .env.template .env. - Create a branch
- Make changes on branch
- Commit using conventional commits syntax
- Once reviewed, increase package version with
deno task version:<minor|major|patch|autosemver>accordingly - Merge in to master, and the package will be deployed to jsr via a github workflow
Built and signed on
GitHub Actions
Add Package
deno add jsr:@tomsfactory/bot
Import symbol
import * as bot from "@tomsfactory/bot";
Import directly with a jsr specifier
import * as bot from "jsr:@tomsfactory/bot";