import { SiteDescription, Contest, Problem } from "../types"; // TODO: Use sync requests const request = require('request'); /** * contestId: ${contest} * http://codeforces.com/contest/${contest}/ * * Example: * http://codeforces.com/contest/1081/ */ function parseContest(contestId: string | number) { let problems: Problem[] = []; let res = request('GET', `http://codeforces.com/contest/${contestId}`); let body = res.getBody('utf8'); console.log(body); let pos = body!.indexOf('