PageSourceSearch

https://podtoo.com/_next/static/chunks/pages/rssimport-84bba73976a40bb6.js

js podtoo.com collected 2026-10-02 13:01:15 UTC 6,050 bytes, 136 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ce935408-5ba0-48a1-bd91-ddcfebe7f574",e._sentryDebugIdIdentifier="sentry-dbid-ce935408-5ba0-48a1-bd91-ddcfebe7f574");}catch(e){}}();
2(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([[3162],{
3
4/***/ 18819:
5/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
6
7
8    (window.__NEXT_P = window.__NEXT_P || []).push([
9      "/rssimport",
10      function () {
11        return __webpack_require__(69076);
12      }
13    ]);
14    if(false) {}
15  
16
17/***/ }),
18
19/***/ 69076:
20/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
21
22"use strict";
23__webpack_require__.r(__webpack_exports__);
24/* harmony export */ __webpack_require__.d(__webpack_exports__, {
25/* harmony export */   "default": function() { return /* binding */ RssImport; }
26/* harmony export */ });
27/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85893);
28/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67294);
29/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(87066);
30
31
32
33const { XMLParser } = __webpack_require__(16932);
34function RssImport() {
35    const [rssContent, setRssContent] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)("");
36    const [rssData, setRssData] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
37    (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{
38        async function fetchRssFeed() {
39            try {
40                const response = await axios__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.get("https://podnews.net/rss") //('https://podnews.net/rss');
41                ;
42                const rssContent = response.data;
43                setRssContent(rssContent);
44                parseRssContent(rssContent);
45            } catch (error) {
46                console.error("Error fetching RSS feed:", error);
47            }
48        }
49        fetchRssFeed();
50    }, []);
51    // Helper function to parse the RSS content and extract tags
52    function parseRssContent(content) {
53        const options = {
54            ignoreAttributes: false
55        };
56        const parser = new XMLParser(options);
57        const parsedJson = parser.parse(content);
58        // Extract specific tags from the RSS feed along with the tag names
59        const extractedTags = extractTags(parsedJson);
60        // Set the extracted tags
61        setRssData(extractedTags);
62    }
63    // Helper function to extract specific tags from the parsed JSON along with tag names
64    function extractTags(jsonObj) {
65        const tags = [];
66        // Helper function to traverse the JSON object
67        function traverse(obj) {
68            let parentKey = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
69            if (typeof obj === "object") {
70                for(const key in obj){
71                    if (obj.hasOwnProperty(key)) {
72                        const currentKey = parentKey ? "".concat(parentKey, ".").concat(key) : key;
73                        const value = obj[key];
74                        if (typeof value === "string") {
75                            tags.push({
76                                tag: currentKey,
77                                value
78                            });
79                        }
80                        traverse(value, currentKey);
81                    }
82                }
83            }
84        }
85        // Traverse the JSON object
86        traverse(jsonObj);
87        return tags;
88    }
89    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
90        children: [
91            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", {
92                children: "RSS Feed"
93            }),
94            rssContent ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("pre", {
95                children: rssContent
96            }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
97                children: "Loading..."
98            }),
99            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
100                children: [
101                    /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", {
102                        children: "RSS Feed Tags"
103                    }),
104                    rssData.length > 0 ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("ul", {
105                        children: rssData.map((item, index)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("li", {
106                                children: [
107                                    /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("strong", {
108                                        children: [
109                                            item.tag,
110                                            ":"
111                                        ]
112                                    }),
113                                    " ",
114                                    item.value
115                                ]
116                            }, index))
117                    }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
118                        children: "No tags available"
119                    })
120                ]
121            })
122        ]
123    });
124}
125
126
127/***/ })
128
129},
130/******/ function(__webpack_require__) { // webpackRuntimeModules
131/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
132/******/ __webpack_require__.O(0, [7066,6932,2888,9774,179], function() { return __webpack_exec__(18819); });
133/******/ var __webpack_exports__ = __webpack_require__.O();
134/******/ _N_E = __webpack_exports__;
135/******/ }
136]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.