use constant url

This commit is contained in:
Fran Jurmanović
2023-10-05 19:05:33 +02:00
parent 07f9b5c581
commit 71c9d1635b

View File

@@ -1,8 +1,9 @@
import { config } from "@constants";
import axios from "axios";
import cheerio from "cheerio";
export async function getFirstHtml(): Promise<string> {
const response = await axios.get("https://sib.net.hr/legica-dana");
const response = await axios.get(config.LEGICA_URL);
const html = response.data;
const $ = cheerio.load(html);
const { href } = $(".News-link.c-def")?.attr() || {};