Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

pcso-lotto-web-scraper

jmrl2328MIT1.2.3TypeScript support: included

get lotto results

lotto, pcso, web, scraper, results, web scraper, public, automation

readme

pcso lotto web scraper

get lotto results

sample usage

const lottoScraper = new LottoScraper();
const results = await lottoScraper.get({
  from: 'August 1 2014',
  filter(result) {
    return result.game === 'Ultra Lotto 6/58';
  },
});

console.log(results);

types

interface Payload {
  from: string | Date;
  to?: string | Date;
  filter?(result: Result): boolean;
}

interface Result {
  game: Game;
  combinations: number[];
  drawDate: Date;
  jackpot: number;
  winners: number;
}

type Game =
  | 'Ultra Lotto 6/58'
  | 'Grand Lotto 6/55'
  | 'Superlotto 6/49'
  | 'Megalotto 6/45'
  | 'Lotto 6/42'
  | '6D Lotto'
  | '4D Lotto'
  | '3D Lotto 2PM'
  | '3D Lotto 5PM'
  | '3D Lotto 9PM'
  | '2D Lotto 2PM'
  | '2D Lotto 5PM'
  | '3D Lotto 9PM';