13 lines
413 B
TypeScript
13 lines
413 B
TypeScript
import { Effect } from 'effect'
|
|
import type { Page } from 'puppeteer'
|
|
import { getVariations } from '.'
|
|
|
|
const BATTERY_CONTAINER_SELECTOR = '.new_battery_options'
|
|
|
|
export const getBatteryVariations = (page: Page) =>
|
|
Effect.gen(function* () {
|
|
return yield* getVariations(page, BATTERY_CONTAINER_SELECTOR, 'DIV').pipe(
|
|
Effect.catchTag('VariationParseError', () => Effect.succeed(undefined)),
|
|
)
|
|
})
|