⚝
One Hat Cyber Team
⚝
Your IP:
216.73.217.4
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
grafana
/
public
/
app
/
plugins
/
panel
/
news
/
Edit File: feed.ts
import { parseAtomFeed } from './atom'; import { parseRSSFeed } from './rss'; export async function fetchFeedText(url: string) { const rsp = await fetch(url); const txt = await rsp.text(); return txt; } export function isAtomFeed(txt: string) { const domParser = new DOMParser(); const doc = domParser.parseFromString(txt, 'text/xml'); return doc.querySelector('feed') !== null; } export function getProperty(node: Element, property: string): string { const propNode = node.querySelector(property); return propNode?.textContent ?? ''; } export async function loadFeed(url: string) { const res = await fetchFeedText(url); const parsedFeed = isAtomFeed(res) ? parseAtomFeed(res) : parseRSSFeed(res); return parsedFeed; }
Simpan