rbren / rss-parser

A lightweight RSS parser, for Node and the browser
MIT License
1.38k stars 209 forks source link

I am not able to fetch few RSS urls like BBC and Times Of India #250

Closed ishaanparlikar closed 1 year ago

ishaanparlikar commented 1 year ago

I tried these urls and I am getting error on Next Js 13.

https://timesofindia.indiatimes.com/rssfeedstopstories.cms http://feeds.bbci.co.uk/news/rss.xml

TypeError: Failed to fetch at l._onFinish (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/stream-http/index.js:4:48867) at e.exports.eval (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/stream-http/index.js:4:47795) at e.exports.emit (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/events/events.js:2:2421) at finishMaybe (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/stream-http/index.js:4:29811) at endWritable (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/stream-http/index.js:4:29969) at Writable.end (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/stream-http/index.js:4:29086) at l.end (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/stream-http/index.js:4:50976) at get (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/stream-http/index.js:4:45422) at i.get (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/https-browserify/index.js:2:261) at eval (webpack-internal:///(app-client)/./node_modules/.pnpm/rss-parser@3.13.0/node_modules/rss-parser/lib/parser.js:79:17) at new Promise (<anonymous>) at Parser.parseURL (webpack-internal:///(app-client)/./node_modules/.pnpm/rss-parser@3.13.0/node_modules/rss-parser/lib/parser.js:77:16) at addRss (webpack-internal:///(app-client)/./components/AddFeed.tsx:34:38) at HTMLUnknownElement.callCallback (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:19437:14) at Object.invokeGuardedCallbackImpl (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:19486:16) at invokeGuardedCallback (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:19561:29) at invokeGuardedCallbackAndCatchFirstError (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:19575:25) at executeDispatch (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:30600:3) at processDispatchQueueItemsInOrder (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:30632:7) at processDispatchQueue (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:30645:5) at dispatchEventsForPlugins (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:30656:3) at eval (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:30846:12) at batchedUpdates$1 (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:23743:12) at batchedUpdates (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:27562:12) at dispatchEventForPluginEventSystem (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:30845:3) at dispatchEvent (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:28618:5) at dispatchDiscreteEvent (webpack-internal:///(app-client)/./node_modules/.pnpm/next@13.4.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js:28589:5)

rbren commented 1 year ago

Probably an issue with the feeds, maybe user-agent sniffing. If you're able to come up with a minimal repro using parseString, feel free to open a new issue