I am trying to read the RSS Feed of http://www.youm7.com/new3agelrss.asp
using RSS feeds with Java - Tutorial
for Lars Vogel.
I managed to read another rss feeds using the exact code without problems.
For this link I get
Server returned HTTP response code: 403 for URL: http://www.youm7.com/new3agelrss.asp
According to java.io.IOException: Server returned HTTP response code: 403 for URL I edited private InputStream read()
method as follow:
private InputStream read() {
try {
HttpURLConnection httpcon = (HttpURLConnection) url.openConnection();
httpcon.addRequestProperty("User-Agent", "Mozilla/4.76");
return httpcon.getInputStream();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
Now I am getting:
Server returned HTTP response code: 503 for URL: http://www.youm7.com/new3agelrss.asp
Even that I can open that Url throw the web browser! and you can try it yourself. Please help. I am open to any alternative approach. Thanks in advance.
Note:
I installed two RSS reader application on my Mac. (RSS Notifier and RSS Bot) and both managed to read that RSS.