ran tsc locally

This commit is contained in:
Kfir Dayan 2024-02-04 12:56:26 +02:00
parent d5408c359b
commit ea7e224c9e
2 changed files with 49 additions and 43 deletions

6
dist/GameSource.js vendored
View file

@ -12,6 +12,8 @@ const moment_1 = __importDefault(require("moment")); // require
class GameSource {
async getGamesFromHaifa() {
const sourceUrl = `http://mhaifafc.com/games?lang=en`;
console.log('Trying to get games from Haifa...');
try {
const result = await axios_1.default.get(sourceUrl);
const parsedResult = (0, node_html_parser_1.parse)(result.data.toString());
const gameBoxs = parsedResult.querySelectorAll(".game-box");
@ -56,6 +58,10 @@ class GameSource {
// return [];
return games;
}
catch (error) {
console.error(error);
}
}
findTime(headerSplit) {
let time = '';
headerSplit.forEach((item) => {

View file

@ -9,7 +9,7 @@ import moment from "moment"; // require
export default class GameSource {
async getGamesFromHaifa(): Promise<GoogleCalendarEvent[]> {
const sourceUrl = `https://mhaifafc.com/games?lang=en`;
const sourceUrl = `http://mhaifafc.com/games?lang=en`;
console.log('Trying to get games from Haifa...');
try {
const result = await axios.get(sourceUrl);