9b395f5cc3
E2E Headed Chrome / e2e-headed (macos-15) (push) Has been cancelled
E2E Headed Chrome / e2e-headed (ubuntu-latest) (push) Has been cancelled
E2E Headed Chrome / e2e-headed (windows-latest) (push) Has been cancelled
CI / build (macos-latest) (push) Has been cancelled
CI / build (ubuntu-latest) (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
CI / unit-test (push) Has been cancelled
CI / bun-test (push) Has been cancelled
CI / adapter-test (push) Has been cancelled
CI / smoke-test (macos-latest) (push) Has been cancelled
CI / smoke-test (ubuntu-latest) (push) Has been cancelled
Security Audit / audit (push) Has been cancelled
Build Chrome Extension / build (push) Has been cancelled
Trigger Website Rebuild (Docs Updated) / dispatch (push) Has been cancelled
22 lines
829 B
JavaScript
22 lines
829 B
JavaScript
import { cli, Strategy } from '@jackwener/opencli/registry';
|
|
import { readMatchSeries } from './utils.js';
|
|
|
|
cli({
|
|
site: 'hltv',
|
|
name: 'match-series',
|
|
description: 'Expand an HLTV match or stats series into summary, map, and player rows',
|
|
access: 'read',
|
|
example: 'opencli hltv match-series https://www.hltv.org/stats/matches/126993/spirit-vs-falcons -f json',
|
|
domain: 'www.hltv.org',
|
|
strategy: Strategy.UI,
|
|
browser: true,
|
|
navigateBefore: false,
|
|
args: [
|
|
{ name: 'match', type: 'string', positional: true, required: true, help: 'HLTV match, stats series, or mapstats URL' },
|
|
],
|
|
columns: ['rowType', 'date', 'event', 'map', 'team', 'opponent', 'score', 'matchStatsId', 'playerId', 'playerName', 'rating', 'details'],
|
|
func: async (page, args) => {
|
|
return readMatchSeries(page, args.match);
|
|
},
|
|
});
|