Skip to main content
Home

Built and signed on GitHub Actions

no description

This package works with Deno
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

  1. Install the package with deno add jsr:@tomsfactory/bot
  2. 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

  1. 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 so cp .env.template .env.
  2. Create a branch
  3. Make changes on branch
  4. Commit using conventional commits syntax
  5. Once reviewed, increase package version with deno task version:<minor|major|patch|autosemver> accordingly
  6. Merge in to master, and the package will be deployed to jsr via a github workflow
Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@tomsfactory/bot

Import symbol

import * as bot from "@tomsfactory/bot";
or

Import directly with a jsr specifier

import * as bot from "jsr:@tomsfactory/bot";