Skip to content

Instantly share code, notes, and snippets.

View AndrejsAbrickis's full-sized avatar
🎾

Andrejs Abrickis AndrejsAbrickis

🎾
View GitHub Profile
/// <reference path="./node_modules/lighthouse/typings/externs.d.ts"/>
import * as fs from 'fs';
import * as chromeLauncher from 'chrome-launcher';
import lighthouse from 'lighthouse/lighthouse-core';
import ReportGenerator from 'lighthouse/lighthouse-core/report/report-generator';
const run = async (url: string, options: chromeLauncher.Options) => {
const chrome: chromeLauncher.LaunchedChrome = await chromeLauncher.launch({ chromeFlags: options.chromeFlags });
options.port = chrome.port;
const axios = require('axios');
const cheerio = require('cheerio');
(async () => {
try {
const response = await axios.get('https://bvopen.abrickis.me/#/standings');
const $ = cheerio.load(response.data);
console.log($('body').html());
} catch (error) {
const puppeteer = require('puppeteer');
(async () => {
try {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://bvopen.abrickis.me/#/standings');
await page.waitForSelector('.category', { timeout: 1000 });
const body = await page.evaluate(() => {
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
>
<path :d="path" />
</svg>
</template>
<template>
<div id="app">
<p>Count: {{ count }}</p>
<div>
<ButtonDecrease
:label="labels.decrease"
:count="count"
@buttonClicked="handleDecrease"
/>
<ButtonIncrease
<template>
<button type="button" @click="handleClick">{{ label }}</button>
</template>
<script>
export default {
name: "ButtonIncrease",
props: {
count: Number,
label: String