{"id":2759,"date":"2026-04-05T15:07:31","date_gmt":"2026-04-05T09:37:31","guid":{"rendered":"https:\/\/newsdive.net\/?page_id=2759"},"modified":"2026-04-05T15:07:33","modified_gmt":"2026-04-05T09:37:33","slug":"code","status":"publish","type":"page","link":"https:\/\/newsdive.net\/index.php\/code\/","title":{"rendered":"Code"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-4e25967d wp-block-columns-is-layout-flex\" style=\"padding-right:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--10)\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" \/>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/>\n  <meta name=\"description\" content=\"AI-generated news summaries with insights from NewsDive\">\n  <meta name=\"keywords\" content=\"AI, News, Summary, NewsDive, Headlines, Breaking News\">\n  <meta name=\"author\" content=\"NewsDive Team\">\n  <title>AI News Summary<\/title>\n  <style>\n    * { margin: 0; padding: 0; box-sizing: border-box; }\n    body { background: #ffffff; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }\n    .news-summary-container {\n      display: grid;\n      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n      max-width: 1210px;\n      margin: 0 auto;\n      padding: 20px;\n      gap: 20px;\n    }\n    .loading-container,\n    .error-container,\n    .summary-container {\n      grid-column: 1 \/ -1;\n      width: 100%;\n      padding: 20px;\n      background: #f8fafc;\n      border: 1px solid #e2e8f0;\n      border-radius: 15px;\n      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);\n      text-align: center;\n      position: relative;\n    }\n    .loading-spinner {\n      width: 48px;\n      height: 48px;\n      border: 4px solid rgba(30,60,114,0.2);\n      border-top: 4px solid #1e3c72;\n      border-radius: 50%;\n      animation: spin 1s linear infinite;\n      margin: 0 auto 16px;\n    }\n    @keyframes spin { to { transform: rotate(360deg); } }\n    .loading-text { color: #1e3c72; font-size: 1.1rem; }\n    .error-container { display: none; color: #c53030; }\n    .refresh-btn {\n      background: #4299e1;\n      color: white;\n      border: none;\n      padding: 10px 20px;\n      border-radius: 20px;\n      cursor: pointer;\n      margin-top: 12px;\n      font-weight: 600;\n      transition: all 0.3s ease;\n    }\n    .refresh-btn:hover {\n      background: #3182ce;\n      transform: translateY(-2px);\n    }\n    .summary-container { display: none; text-align: left; }\n    .summary-content {\n      color: #333;\n      font-size: 0.95rem;\n      line-height: 1.8;\n      padding: 0;\n    }\n    .summary-content h1, .summary-content h2, .summary-content h3 {\n      color: #222;\n      margin: 24px 0 16px;\n      font-weight: 600;\n    }\n    .summary-content p { margin-bottom: 15px; }\n    .summary-content ul, .summary-content ol { margin: 16px 0; padding-left: 24px; }\n    .summary-content code { background: #e9ecef; padding: 2px 4px; border-radius: 4px; font-family: monospace; }\n\n    .card-header {\n      display: flex;\n      justify-content: space-between;\n      align-items: center;\n      margin-bottom: 20px;\n      padding-bottom: 15px;\n      border-bottom: 1px solid #e2e8f0;\n    }\n    .card-title {\n      font-size: 1.5rem;\n      font-weight: 700;\n      color: #1e3c72;\n    }\n\n    .share-container {\n      display: flex;\n      gap: 12px;\n    }\n    .share-btn {\n      width: 40px;\n      height: 40px;\n      border-radius: 50%;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      cursor: pointer;\n      transition: all 0.3s ease;\n      border: none;\n      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);\n    }\n    .share-btn:hover {\n      transform: translateY(-3px) scale(1.05);\n      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);\n    }\n    .whatsapp-btn { background: #25D366; }\n    .telegram-btn { background: #0088CC; }\n    .read-btn { background: #805AD5; }\n    .share-btn svg {\n      width: 22px;\n      height: 22px;\n      fill: white;\n    }\n\n    @media (max-width: 768px) {\n      .news-summary-container { grid-template-columns: 1fr; padding: 10px; }\n      .loading-container, .error-container, .summary-container { padding: 20px; }\n      .card-header { flex-wrap: wrap; gap: 10px; }\n      .card-title {\n        font-size: 1.2rem;\n        flex: 1 1 100%;\n        margin-bottom: 8px;\n      }\n      .share-btn { width: 36px; height: 36px; }\n      .share-btn svg { width: 20px; height: 20px; }\n      .share-container { gap: 8px; margin-top: 5px; }\n    }\n    \n    \/* Audio controls *\/\n    .audio-controls {\n      display: flex;\n      flex-direction: column;\n      gap: 10px;\n      margin-top: 20px;\n      padding: 15px;\n      background: #f1f5f9;\n      border-radius: 10px;\n      display: none;\n    }\n    .audio-player {\n      width: 100%;\n      height: 40px;\n      margin-top: 10px;\n    }\n    .audio-player::-webkit-media-controls-panel {\n      background-color: #f1f5f9;\n    }\n    .audio-controls-header {\n      display: flex;\n      justify-content: space-between;\n      align-items: center;\n    }\n    .audio-title {\n      font-weight: 600;\n      color: #1e3c72;\n    }\n    .close-audio-btn {\n      background: none;\n      border: none;\n      cursor: pointer;\n      font-size: 1.2rem;\n      color: #64748b;\n    }\n    \n    \/* Audio loading state *\/\n    .audio-loading {\n      display: flex;\n      align-items: center;\n      gap: 10px;\n      color: #4a5568;\n      font-size: 0.9rem;\n    }\n    .audio-loading-spinner {\n      width: 20px;\n      height: 20px;\n      border: 2px solid rgba(30,60,114,0.2);\n      border-top: 2px solid #1e3c72;\n      border-radius: 50%;\n      animation: spin 1s linear infinite;\n    }\n    \n    \/* Audio error message *\/\n    .audio-error {\n      color: #c53030;\n      font-size: 0.9rem;\n      margin-top: 5px;\n    }\n  <\/style>\n<\/head>\n<body>\n  <div class=\"news-summary-container\">\n    <div class=\"loading-container\" id=\"loadingContainer\" role=\"status\" aria-live=\"polite\">\n      <div class=\"loading-spinner\"><\/div>\n      <p class=\"loading-text\">Fetching and analyzing the latest headlines&#8230;<\/p>\n    <\/div>\n\n    <div class=\"error-container\" id=\"errorContainer\">\n      <div>\u26a0\ufe0f Something went wrong fetching the summary.<\/div>\n      <button class=\"refresh-btn\" onclick=\"fetchSummary()\">Try Again<\/button>\n    <\/div>\n\n    <div class=\"summary-container\" id=\"summaryContainer\">\n      <div class=\"card-header\">\n        <h2 class=\"card-title\">Today&#8217;s News Digest<\/h2>\n        <div class=\"share-container\">\n          <!-- WhatsApp -->\n          <button class=\"share-btn whatsapp-btn\" onclick=\"shareOnWhatsApp()\" title=\"Share on WhatsApp\" aria-label=\"Share on WhatsApp\">\n            <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n              <path d=\"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.297-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347M12.051 21.785h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z\"\/>\n            <\/svg>\n          <\/button>\n          <!-- Telegram -->\n          <button class=\"share-btn telegram-btn\" onclick=\"shareOnTelegram()\" title=\"Share on Telegram\" aria-label=\"Share on Telegram\">\n            <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n              <path d=\"M12 0c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.894 8.221l-1.97 9.28c-.145.658-.537.818-1.084.508l-3-2.21-1.447 1.394c-.14.141-.259.259-.374.261l.213-3.053 5.56-5.022c.24-.213-.054-.334-.373-.121l-6.869 4.326-2.96-.924c-.64-.203-.658-.64.135-.954l11.566-4.458c.538-.196 1.006.128.832.941z\"\/>\n            <\/svg>\n          <\/button>\n          <!-- Audio Summary -->\n          <button class=\"share-btn read-btn\" id=\"audioBtn\" title=\"Audio Summary\" aria-label=\"Audio Summary\">\n            <svg id=\"playIcon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n              <path d=\"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z\"\/>\n            <\/svg>\n            <svg id=\"pauseIcon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" style=\"display: none;\">\n              <path d=\"M6 19h4V5H6v14zm8-14v14h4V5h-4z\"\/>\n            <\/svg>\n          <\/button>\n        <\/div>\n      <\/div>\n      <div class=\"summary-content\" id=\"summaryContent\"><\/div>\n      \n      <!-- Audio Controls -->\n      <div class=\"audio-controls\" id=\"audioControls\">\n        <div class=\"audio-controls-header\">\n          <div class=\"audio-title\">Audio Summary<\/div>\n          <button class=\"close-audio-btn\" onclick=\"closeAudioPlayer()\" aria-label=\"Close audio player\">\u00d7<\/button>\n        <\/div>\n        <div id=\"audioLoading\" class=\"audio-loading\" style=\"display: none;\">\n          <div class=\"audio-loading-spinner\"><\/div>\n          <div>Loading audio&#8230;<\/div>\n        <\/div>\n        <div id=\"audioError\" class=\"audio-error\" style=\"display: none;\"><\/div>\n        <audio class=\"audio-player\" id=\"audioPlayer\" controls>\n          Your browser does not support the audio element.\n        <\/audio>\n      <\/div>\n    <\/div>\n  <\/div>\n\n  <!-- marked.js for Markdown parsing -->\n  <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/marked\/4.3.0\/marked.min.js\"><\/script>\n  <script>\n    let apiContent = '';\n    let audioPlayer = null;\n    let isAudioPlaying = false;\n    let audioLoaded = false;\n\n    \/\/ Strip everything up to & including the first '---'\n    function extractAfterSeparator(text) {\n      const sep = '---';\n      const idx = text.indexOf(sep);\n      return idx !== -1 ? text.slice(idx + sep.length).trim() : text;\n    }\n\n    async function fetchUserCountryAndLoad() {\n      try {\n        const r = await fetch('https:\/\/ipapi.co\/json\/');\n        if (!r.ok) throw new Error();\n        const data = await r.json();\n        if (data.country === 'LK') fetchSummary();\n        else document.getElementById('loadingContainer').style.display = 'none';\n      } catch {\n        try {\n          const fb = await fetch('https:\/\/ipinfo.io\/json');\n          if (!fb.ok) throw new Error();\n          const data2 = await fb.json();\n          if (data2.country === 'LK') fetchSummary();\n          else document.getElementById('loadingContainer').style.display = 'none';\n        } catch {\n          document.getElementById('loadingContainer').style.display = 'none';\n        }\n      }\n    }\n\n    async function fetchSummary() {\n      document.getElementById('loadingContainer').style.display = 'block';\n      document.getElementById('errorContainer').style.display = 'none';\n      document.getElementById('summaryContainer').style.display = 'none';\n      try {\n        const res = await fetch('https:\/\/newsdive.online\/summary');\n        if (!res.ok) throw new Error(res.status);\n        const txt = await res.text();\n        apiContent = txt;\n        document.getElementById('loadingContainer').style.display = 'none';\n        document.getElementById('summaryContent').innerHTML = marked.parse(txt);\n        document.getElementById('summaryContainer').style.display = 'block';\n      } catch {\n        document.getElementById('loadingContainer').style.display = 'none';\n        document.getElementById('errorContainer').style.display = 'block';\n      }\n    }\n\n    function truncateText(text, maxLen) {\n      const plain = text\n        .replace(\/(\\*\\*|__)(.*?)\\1\/g, '$2')\n        .replace(\/\\[(.*?)\\]\\(.*?\\)\/g, '$1')\n        .replace(\/#+\\s*\/g, '')\n        .replace(\/\\r\\n\/g, '\\n')\n        .trim();\n      return plain.length <= maxLen ? plain : plain.slice(0, maxLen) + '...';\n    }\n\n    function shareOnWhatsApp() {\n      if (!apiContent) return;\n      const body = extractAfterSeparator(apiContent);\n      let shareText = truncateText(body, 10000);\n      shareText += \"\\n\\nRead more: \" + window.location.href;\n      window.open(`https:\/\/api.whatsapp.com\/send?text=${encodeURIComponent(shareText)}`, '_blank', 'width=600,height=400');\n    }\n\n    function shareOnTelegram() {\n      if (!apiContent) return;\n      \n      const body = extractAfterSeparator(apiContent);\n      let shareText = truncateText(body, 10000);\n      shareText += \"\\n\\nRead more: \" + window.location.href;\n      \n      \/\/ Use URLSearchParams to properly construct the URL\n      const telegramBaseUrl = 'https:\/\/telegram.me\/share\/url';\n      const params = new URLSearchParams();\n      params.set('url', window.location.href);\n      params.set('text', shareText);\n      \n      \/\/ Fix the + encoding issue by replacing + with %20 for spaces\n      const telegramUrl = `${telegramBaseUrl}?${params.toString().replace(\/\\+\/g, '%20')}`;\n      \n      window.open(telegramUrl, '_blank', 'width=600,height=400');\n    }\n\n    \/\/ Toggle audio summary functionality\n    async function toggleAudioSummary() {\n      const audioControls = document.getElementById('audioControls');\n      const audioPlayer = document.getElementById('audioPlayer');\n      const audioBtn = document.getElementById('audioBtn');\n      const audioLoading = document.getElementById('audioLoading');\n      const audioError = document.getElementById('audioError');\n      \n      \/\/ Show audio controls if hidden\n      if (audioControls.style.display !== 'block') {\n        audioControls.style.display = 'flex';\n      }\n      \n      \/\/ Hide any previous error\n      audioError.style.display = 'none';\n      \n      \/\/ If audio is already playing, pause it\n      if (isAudioPlaying) {\n        audioPlayer.pause();\n        isAudioPlaying = false;\n        updateAudioButton();\n        return;\n      }\n      \n      \/\/ If audio is not loaded, load it first\n      if (!audioLoaded) {\n        try {\n          \/\/ Show loading state\n          audioLoading.style.display = 'flex';\n          audioPlayer.style.display = 'none';\n          \n          await loadAudioSummary();\n          audioLoaded = true;\n          \n          \/\/ Hide loading state, show player\n          audioLoading.style.display = 'none';\n          audioPlayer.style.display = 'block';\n        } catch (error) {\n          console.error('Error loading audio:', error);\n          audioLoading.style.display = 'none';\n          audioError.textContent = 'Error loading audio. Please try again.';\n          audioError.style.display = 'block';\n          return;\n        }\n      }\n      \n      try {\n        \/\/ Try to play the audio\n        await audioPlayer.play();\n        isAudioPlaying = true;\n        updateAudioButton();\n      } catch (error) {\n        console.error('Playback failed:', error);\n        audioError.textContent = 'Playback failed. Please click the play button in the player.';\n        audioError.style.display = 'block';\n      }\n    }\n    \n    \/\/ Update the audio button icon based on current state\n    function updateAudioButton() {\n      const playIcon = document.getElementById('playIcon');\n      const pauseIcon = document.getElementById('pauseIcon');\n      \n      if (isAudioPlaying) {\n        playIcon.style.display = 'none';\n        pauseIcon.style.display = 'block';\n        document.getElementById('audioBtn').setAttribute('title', 'Pause Audio');\n      } else {\n        playIcon.style.display = 'block';\n        pauseIcon.style.display = 'none';\n        document.getElementById('audioBtn').setAttribute('title', 'Play Audio');\n      }\n    }\n    \n    \/\/ Load the audio summary from API\n    async function loadAudioSummary() {\n      return new Promise((resolve, reject) => {\n        const audioPlayer = document.getElementById('audioPlayer');\n        const audioUrl = 'https:\/\/newsdive.online\/audio_summary';\n        \n        try {\n          \/\/ Add timestamp to avoid caching issues\n          const timestamp = new Date().getTime();\n          const uniqueUrl = `${audioUrl}?t=${timestamp}`;\n          \n          \/\/ Set up event listeners\n          audioPlayer.onloadeddata = () => {\n            resolve();\n          };\n          \n          audioPlayer.onerror = (error) => {\n            reject(new Error('Audio loading error'));\n          };\n          \n          \/\/ Set the source and load\n          audioPlayer.src = uniqueUrl;\n          audioPlayer.load();\n          \n        } catch (error) {\n          reject(error);\n        }\n      });\n    }\n    \n    \/\/ Close audio player\n    function closeAudioPlayer() {\n      const audioPlayer = document.getElementById('audioPlayer');\n      audioPlayer.pause();\n      isAudioPlaying = false;\n      updateAudioButton();\n      document.getElementById('audioControls').style.display = 'none';\n    }\n\n    window.addEventListener('load', () => {\n      fetchUserCountryAndLoad();\n      \/\/ Initialize audio player\n      audioPlayer = document.getElementById('audioPlayer');\n      \n      \/\/ Set up audio event listeners\n      audioPlayer.addEventListener('play', () => {\n        isAudioPlaying = true;\n        updateAudioButton();\n      });\n      \n      audioPlayer.addEventListener('pause', () => {\n        isAudioPlaying = false;\n        updateAudioButton();\n      });\n      \n      audioPlayer.addEventListener('ended', () => {\n        isAudioPlaying = false;\n        updateAudioButton();\n      });\n      \n      \/\/ Set up click handler for audio button\n      document.getElementById('audioBtn').addEventListener('click', toggleAudioSummary);\n    });\n  <\/script>\n<\/body>\n<\/html>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>AI News Summary Fetching and analyzing the latest headlines&#8230; \u26a0\ufe0f Something went wrong fetching the summary. Try Again Today&#8217;s News Digest Audio Summary \u00d7 Loading audio&#8230; Your browser does not support the audio element.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2759","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Code - News Dive<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/newsdive.net\/index.php\/code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Code - News Dive\" \/>\n<meta property=\"og:description\" content=\"AI News Summary Fetching and analyzing the latest headlines&#8230; \u26a0\ufe0f Something went wrong fetching the summary. Try Again Today&#8217;s News Digest Audio Summary \u00d7 Loading audio&#8230; Your browser does not support the audio element.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/newsdive.net\/index.php\/code\/\" \/>\n<meta property=\"og:site_name\" content=\"News Dive\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-05T09:37:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/newsdive.net\/wp-content\/uploads\/2025\/07\/NewsDive.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1398\" \/>\n\t<meta property=\"og:image:height\" content=\"892\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/newsdive.net\\\/index.php\\\/code\\\/\",\"url\":\"https:\\\/\\\/newsdive.net\\\/index.php\\\/code\\\/\",\"name\":\"Code - News Dive\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/newsdive.net\\\/#website\"},\"datePublished\":\"2026-04-05T09:37:31+00:00\",\"dateModified\":\"2026-04-05T09:37:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/newsdive.net\\\/index.php\\\/code\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/newsdive.net\\\/index.php\\\/code\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/newsdive.net\\\/index.php\\\/code\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/newsdive.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/newsdive.net\\\/#website\",\"url\":\"https:\\\/\\\/newsdive.net\\\/\",\"name\":\"NewsDive\",\"description\":\"AI-Powered News, Updates and summaries, Delivered to your fingertips\",\"publisher\":{\"@id\":\"https:\\\/\\\/newsdive.net\\\/#organization\"},\"alternateName\":\"News Dive\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/newsdive.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/newsdive.net\\\/#organization\",\"name\":\"NewsDive\",\"alternateName\":\"NewsDive\",\"url\":\"https:\\\/\\\/newsdive.net\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/newsdive.net\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/newsdive.net\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/NewsDive-Favicon.png\",\"contentUrl\":\"https:\\\/\\\/newsdive.net\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/NewsDive-Favicon.png\",\"width\":150,\"height\":150,\"caption\":\"NewsDive\"},\"image\":{\"@id\":\"https:\\\/\\\/newsdive.net\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Code - News Dive","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/newsdive.net\/index.php\/code\/","og_locale":"en_US","og_type":"article","og_title":"Code - News Dive","og_description":"AI News Summary Fetching and analyzing the latest headlines&#8230; \u26a0\ufe0f Something went wrong fetching the summary. Try Again Today&#8217;s News Digest Audio Summary \u00d7 Loading audio&#8230; Your browser does not support the audio element.","og_url":"https:\/\/newsdive.net\/index.php\/code\/","og_site_name":"News Dive","article_modified_time":"2026-04-05T09:37:33+00:00","og_image":[{"width":1398,"height":892,"url":"https:\/\/newsdive.net\/wp-content\/uploads\/2025\/07\/NewsDive.jpeg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/newsdive.net\/index.php\/code\/","url":"https:\/\/newsdive.net\/index.php\/code\/","name":"Code - News Dive","isPartOf":{"@id":"https:\/\/newsdive.net\/#website"},"datePublished":"2026-04-05T09:37:31+00:00","dateModified":"2026-04-05T09:37:33+00:00","breadcrumb":{"@id":"https:\/\/newsdive.net\/index.php\/code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/newsdive.net\/index.php\/code\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/newsdive.net\/index.php\/code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/newsdive.net\/"},{"@type":"ListItem","position":2,"name":"Code"}]},{"@type":"WebSite","@id":"https:\/\/newsdive.net\/#website","url":"https:\/\/newsdive.net\/","name":"NewsDive","description":"AI-Powered News, Updates and summaries, Delivered to your fingertips","publisher":{"@id":"https:\/\/newsdive.net\/#organization"},"alternateName":"News Dive","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/newsdive.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/newsdive.net\/#organization","name":"NewsDive","alternateName":"NewsDive","url":"https:\/\/newsdive.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/newsdive.net\/#\/schema\/logo\/image\/","url":"https:\/\/newsdive.net\/wp-content\/uploads\/2025\/08\/NewsDive-Favicon.png","contentUrl":"https:\/\/newsdive.net\/wp-content\/uploads\/2025\/08\/NewsDive-Favicon.png","width":150,"height":150,"caption":"NewsDive"},"image":{"@id":"https:\/\/newsdive.net\/#\/schema\/logo\/image\/"}}]}},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/newsdive.net\/index.php\/wp-json\/wp\/v2\/pages\/2759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/newsdive.net\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/newsdive.net\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/newsdive.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/newsdive.net\/index.php\/wp-json\/wp\/v2\/comments?post=2759"}],"version-history":[{"count":1,"href":"https:\/\/newsdive.net\/index.php\/wp-json\/wp\/v2\/pages\/2759\/revisions"}],"predecessor-version":[{"id":2760,"href":"https:\/\/newsdive.net\/index.php\/wp-json\/wp\/v2\/pages\/2759\/revisions\/2760"}],"wp:attachment":[{"href":"https:\/\/newsdive.net\/index.php\/wp-json\/wp\/v2\/media?parent=2759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}