|
The EduTech Daily |
||
|
Live RSS Feed// Replace this RSS URL with your feed URL const RSS_URL = 'https://api.rss2json.com/v1/api.json?rss_url=https://www.edtechreview.in/feed/'; async function loadRSSFeed() { try { const response = await fetch(RSS_URL); if (!response.ok) throw new Error('Failed to fetch RSS feed'); const data = await response.json(); const container = document.getElementById('rss-feed-container'); container.innerHTML = ''; // Clear previous content data.items.forEach(item => { const feedDiv = document.createElement('div'); feedDiv.classList.add('feed-item'); // Title with link const titleLink = document.createElement('a'); titleLink.href = item.link; titleLink.textContent = item.title; titleLink.classList.add('feed-title'); titleLink.target = '_blank'; feedDiv.appendChild(titleLink); // Publication date const pubDate = document.createElement('div'); pubDate.textContent = new Date(item.pubDate).toLocaleString(); pubDate.classList.add('feed-date'); feedDiv.appendChild(pubDate); // Description with optional image const description = document.createElement('div'); description.innerHTML = item.content || item.description || ''; feedDiv.appendChild(description); container.appendChild(feedDiv); }); } catch (error) { console.error(error); document.getElementById('rss-feed-container').innerHTML = 'Error loading RSS feed.'; } } // Load feed on page load loadRSSFeed(); // Optional: auto-refresh every 5 minutes setInterval(loadRSSFeed, 5 * 60 * 1000); | ||
Copyright 2025 https://www.elearningenterprise4u.com. All Rights Reserved.
|
||