← Back to team overview

indiv-screenlets-dev team mailing list archive

[Bug 867404] Re: [Slideshow]: doesn't work for xkcd.com comics

 

So then here is my patched version of SlideshowScreenlet.py, working
with xkcd.com RSS Feed. Working well for me.

** Attachment added: "patched version of SlideshowScreenlet.py"
   https://bugs.launchpad.net/indiv-screenlets/+bug/867404/+attachment/2507547/+files/SlideshowScreenlet.py

-- 
You received this bug notification because you are a member of
Individual Screenlets Developers, which is subscribed to Individual
Screenlets.
https://bugs.launchpad.net/bugs/867404

Title:
  [Slideshow]: doesn't work for xkcd.com comics

Status in Screenlets — individual widgets development:
  Confirmed

Bug description:
  Hello,

  OS: Ubuntu 10.10
  ver.:Screenlets 0.1.5, Slideshow Screenlet 1.3.3

  The Slideshow Screenlet doesn't work properly for the RSS Feed (http://www.xkcd.com/rss.xml) of xkcd.com comics by Randall Munroe.
  In the Terminal I can see the following output:
  ---------------

  Trying RSS...
  http://www.xkcd.com/rss.xml
  Restored instances from session 'default' ...
  Opened and read.
  4 items found.
  Still variety of 4

  Traceback (most recent call last):
    File "SlideshowScreenlet.py~", line 504, in fetch_mediaRSS
      imageget = urlopen(realimage)
    File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
      return _opener.open(url, data, timeout)
    File "/usr/lib/python2.6/urllib2.py", line 383, in open
      protocol = req.get_type()
    File "/usr/lib/python2.6/urllib2.py", line 244, in get_type
      raise ValueError, "unknown url type: %s" % self.__original
  ValueError: unknown url type: 
  Trying Folder...

  ---------------
  The error occurs because of the XML Style of the RSS Feed on this Page. The Slideshow Screenlet is looking for the Image URL within a "<media:content:..." tag, whereas the XML File of xkcd.com delivers its Image URL within a <description> tag (after 'img src="..."').
  I don't know, if there are more RSS Feeds with this style. So I just did a little Workaround and just change this for xkcd.com, so there is an if-else statement to look for 'img src="..."' for the Image URL instead of the normal tag, if the self.mediaRSS_URL is "http://www.xkcd.com/rss.xml";.
  It would be useful, if there are more RSS Feeds with this style, to take care of this.

To manage notifications about this bug go to:
https://bugs.launchpad.net/indiv-screenlets/+bug/867404/+subscriptions


References