[mythtv-users] question about news feed parsing

Paul Harrison mythtv at sky.com
Mon Apr 29 22:25:53 UTC 2013


On 29/04/13 02:33, Vincent McIntyre wrote:
>> Looks like they are using the Media RSS extension which we only
>> partially support. We assume that anything in a media:content section is
>> a video we can play but in this case they contain images. We should be
>> using the 'medium' or 'type' attributes to filter out anything that is
>> not a video but we don't. We do extract the 'type' but don't do anything
>> with it. I would be easier to use the 'medium' attribute and just ignore
>> anything that isn't a video. See
>> http://www.rssboard.org/media-rss#media-content for details.
>>
> Thanks, I will take a look at the link.
>
> In the meantime I discovered bug #11161 (and #7680) which looks like
> it might be my issue. #11161 has a small patch available..
>
> As peripheral information, I typed the URL for the full news item[2]
> into mythweb and it loaded the page without issue, so it seems this is
> more a mythnews thing than mythweb.
>
>> At least you can download the feed it doesn't work at all here using
>> master I get this error NewsSite: HTTP Protocol Error  Explanation: 0:
>> Moved Permanently when I try.
> Hm. Most web browsers just follow the redirect to the URL it returns
> in such a case,
> don't they? Below is the output from telnetting to the webserver.
> Perhaps the forced disconnection is triggering this/
>
> % telnet abc.net.au 80
> Trying 203.2.218.214...
> Connected to abc.net.au.
> Escape character is '^]'.
> GET /news/feed/51120/rss.xml HTTP/1.1
> Host: www.abc.net.au
>
> HTTP/1.1 301 Moved Permanently
> Connection: close
> Location: http://www.abc.net.au/news/feed/51120/rss.xml
>
> Connection closed by foreign host.
>
> If I use the correct URL that they show above I get the content immediately.
> Notice the different IP address for the server.
>
> % telnet www.abc.net.au 80
> Trying 203.13.161.10...
> Connected to a1632.w7.akamai.net.
> Escape character is '^]'.
> GET /news/feed/51120/rss.xml HTTP/1.1
> Host: www.abc.net.au
>
> HTTP/1.1 200 OK
> Content-Type: application/rss+xml;charset=UTF-8
> Content-Language: en-US
> Expires: Mon, 29 Apr 2013 01:20:46 GMT
> Cache-Control: max-age=0, no-cache, no-store
> Pragma: no-cache
> ... etc
>
> Thanks for your comments.
> Vince
>
> [2] http://www.abc.net.au/news/2013-04-28/canada-appalled-sri-lanka-chosen-to-host-chogm/4655530
>

You was right I just needed to add the www and I could then download the 
feed. It failed like you said when selecting an item. I have a fix for 
this which I'll commit tomorrow once I've had time to test it on a few 
feeds.

Paul H.


More information about the mythtv-users mailing list