prof18 / RSS-Parser

A Kotlin Multiplatform library to parse a RSS Feed
Apache License 2.0
499 stars 127 forks source link

XmlPullParserException: Unexpected token #75

Closed JJSWART closed 3 years ago

JJSWART commented 3 years ago

Describe the bug When handling the specific url I get this error? org.xmlpull.v1.XmlPullParserException: Unexpected token (position:TEXT ο»Ώ@1:4 in java.io.InputStreamReader@325fadc)

My method:

        parserBuilder.parser?.execute(url)
        parserBuilder.parser?.onFinish(object : OnTaskCompleted{
            override fun onError(e: Exception) {
                e.printStackTrace()
                Looper()
            }

            override fun onTaskCompleted(channel: Channel) {
                channel.articles.let { list.addAll(it) }
                Looper()
            }
        })

The link of the RSS Feed http://feeds.wheels24.co.za/articles/Wheels/OffRoad_and_4x4/rss

prof18 commented 3 years ago

Hi, I've tested the library with the feed you provided and it is working without any kind of error.

This is the feed that I've used for testing: https://github.com/prof18/RSS-Parser/blob/adacf43fb5/rssparser/src/test/resources/feed-test-unexpected-token.xml

Feel free to reopen if the issue can be reproducible

TwinklingToon commented 11 months ago

i want to fetch content

  <media:content url="https://images.news18.com/ibnlive/uploads/2023/07/bse-reuters-16894829603x2.jpg" medium="image" height="800" width="1200"/>

please do update