Note that there are some explanatory texts on larger screens.

plurals
  1. POSun Syndication API throwing error while trying to parse specific RSS feed
    primarykey
    data
    text
    <p>Using the SUN syndication API ROME, I am trying to parse the following RSS feed:</p> <pre><code>http://news.yahoo.com/rss/world;_ylt=AmPejPeRK0mzDzsOSrANm125scB_;_ylu=X3oDMTFqbTQ3ajl2BG1pdANSU1MgU2l0ZUluZGV4IFdvcmxkBHBvcwM0BHNlYwNNZWRpYVJTU0VkaXRvcmlhbA--;_ylg=X3oDMTFrM25vcXFyBGludGwDdXMEbGFuZwNlbi11cwRwc3RhaWQDBHBzdGNhdAMEcHQDc2VjdGlvbnMEdGVzdAM-;_ylv=3 </code></pre> <p>following is the code for this:</p> <pre><code>import java.net.URL; import com.sun.syndication.feed.synd.SyndFeed; import com.sun.syndication.io.SyndFeedInput; import com.sun.syndication.io.XmlReader; public class Test { public static void main(String[] args) { URL url; XmlReader reader = null; SyndFeed feed; try { url = new URL( "http://news.yahoo.com/rss/world;_ylt=AmPejPeRK0mzDzsOSrANm125scB_;_ylu=X3oDMTFqbTQ3ajl2BG1p dANSU1MgU2l0ZUluZGV4IFdvcmxkBHBvcwM0BHNlYwNNZWRpYVJTU0VkaXRvcmlhbA-- ;_ylg=X3oDMTFrM25vcXFyBGludGwDdXMEbGFuZwNlbi11cwRwc3RhaWQDBHBzdGNhdAMEcHQDc2VjdGlvbnMEdGVzdA M-;_ylv=3"); reader = new XmlReader(url); feed = new SyndFeedInput().build(reader); } catch (Exception e) { e.printStackTrace(); } } } </code></pre> <p>I am getting the below Exception:</p> <pre><code>java.io.FileNotFoundException: http://localhost/world/?format=rss at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1401) at com.sun.syndication.io.XmlReader.&lt;init&gt;(XmlReader.java:237) at com.sun.syndication.io.XmlReader.&lt;init&gt;(XmlReader.java:213) at Test.main(Test.java:20) </code></pre> <p>This occurs on a response of 404 as i could infer in the HTTPUrlConnection class, is there any workaround for this kind of problem?</p> <p>This issue is only with this particular URL, does anyone has any idea on how to overcome this problem?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload