-2

if I do a wget on BBC RSS it works fine:

wget http://feeds.bbci.co.uk/news/world/rss.xml

But if I do that with times, I get a 403 forbidden error:

wget http://www.thetimes.co.uk/tto/news/rss

Even though this is meant to be the correct rss: http://www.thetimes.co.uk/tto/newsrss/?service=rss

What am I missing please?

Houman
  • 1,545
  • 4
  • 22
  • 36
  • 2
    Downvoting without comment is useless. What do you want me to change? I can't see into your head. – Houman May 14 '15 at 10:15

2 Answers2

2

In most cases, supplying wget with a user agent will resolve errors such as 403 forbidden:

wget -U "Mozilla" http://www.thetimes.co.uk/tto/news/rss

This worked for me.

krt
  • 274
  • 1
  • 2
  • 12
0

The request may be failing because the Times is filtering based upon the provided user agent.

To change your user agent to impersonate Firefox on OSX, try this:

wget --header="Accept: text/html" --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0" http://www.thetimes.co.uk/tto/news/rss

Hyppy
  • 15,608
  • 1
  • 38
  • 59
kwachu
  • 19
  • 2
  • Although the code is appreciated, it should always have an accompanying explanation. This doesn't have to be long but it is expected. – peterh May 14 '15 at 13:16