use constant url
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
|
import { config } from "@constants";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import cheerio from "cheerio";
|
import cheerio from "cheerio";
|
||||||
|
|
||||||
export async function getFirstHtml(): Promise<string> {
|
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 html = response.data;
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
const { href } = $(".News-link.c-def")?.attr() || {};
|
const { href } = $(".News-link.c-def")?.attr() || {};
|
||||||
|
|||||||
Reference in New Issue
Block a user