<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,7 +6,7 @@ See `examples/check_doctor_who.rb` for an example.
 
 You need the brand pid for the show you want.
 This can be found by visiting:
-http://bbc.co.uk/programmes
+&lt;http://bbc.co.uk/programmes&gt;
 
 You can provide a different strategy to execute, by default it will tweet to the twitter account of your choice.
 
@@ -14,4 +14,4 @@ You can provide a different strategy to execute, by default it will tweet to the
 - Allow multiple strategies
 
 # License
-See LICENSE
\ No newline at end of file
+See `LICENSE`
\ No newline at end of file</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -12,8 +12,10 @@ module Snowblink
       def initialize(series_name, details)
         @series_name = series_name
         @details = details
-        set_end_time
-        set_name_and_pid
+        unless details.nil?
+          set_end_time
+          set_name_and_pid
+        end
         @updated = false
       end
 
@@ -55,9 +57,9 @@ module Snowblink
         end
       end
       
-      def iplayer_available?
-        !@details.search('div.availability').empty?
-      end
+      # def iplayer_available?
+      #   !@details.search('div.availability').empty?
+      # end
       
       def aired?
         Time.now &gt; Time.local(*ParseDate.parsedate(@end_time))</diff>
      <filename>lib/snowblink/iplay/episode.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,24 +16,36 @@ module Snowblink
       def initialize(pid, strategy=Strategy::Twitter.new)
         @pid = pid || 'b006q2x0' # default to Doctor Who!
         @programme_url = BBC_PROGRAMMES_URL + @pid    
-        @comingup_url = @programme_url + '/comingup'
+        @comingup_url = @programme_url # this is no longer consistent, so set it to the same as programme_url for the time being
         @episodes = []
         doc = Hpricot(open(@programme_url))
         @name = doc.at('h1').inner_text
         @strategy = strategy
 
-        get_coming_up
       end
 
       def get_episodes(url)
         doc = Hpricot(open(url))
+        return if doc.nil?
         # create episodes and push into @episodes
 
-        doc.search(&quot;ol.episodes&quot;).each do |episode_list|
-          episode_list.search(&quot;li&quot;).each do |episode_list_item|
-            episode = Episode.new(@name, episode_list_item)
-            @episodes &lt;&lt; episode unless @episodes.any?{|ep| ep.pid == episode.pid}
-          end
+        # for tv shows
+        doc.search(&quot;a&quot;).each do |potential_episode|
+          pid_href = potential_episode.get_attribute('href')
+          next if pid_href.nil?
+          pid = pid_href.match(%r{^http://www.bbc.co.uk/iplayer/episode/([^/]+)$})
+          next if pid.nil?
+          episode = Episode.new(@name, nil)
+          episode.pid = pid[1]
+          @episodes &lt;&lt; episode unless @episodes.any?{|ep| ep.pid == episode.pid}
+        end
+        
+        # for radio shows
+        doc.search(&quot;a.aod-link&quot;).each do |episode_link|
+          pid = episode_link.get_attribute('href').match(/[^\/]+$/)[0]
+          episode = Episode.new(@name, nil)
+          episode.pid = pid
+          @episodes &lt;&lt; episode unless @episodes.any?{|ep| ep.pid == episode.pid}
         end
       end
       
@@ -71,3 +83,4 @@ module Snowblink
     end
   end
 end
+</diff>
      <filename>lib/snowblink/iplay/programme.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9fbc050ef69b3668bbcb1b26c7c0dd1711727d17</id>
    </parent>
  </parents>
  <author>
    <name>Jonathan Lim</name>
    <email>snowblink@gmail.com</email>
  </author>
  <url>http://github.com/snowblink/iplay/commit/40f1584ea3a814223cc6a201e4dd5c212702ae8e</url>
  <id>40f1584ea3a814223cc6a201e4dd5c212702ae8e</id>
  <committed-date>2009-04-17T01:04:47-07:00</committed-date>
  <authored-date>2009-04-17T01:04:47-07:00</authored-date>
  <message>Updating as BBC have changed their programmes site.</message>
  <tree>ebe94b177f41e8a4577ef25fc4258c63d9c326d3</tree>
  <committer>
    <name>Jonathan Lim</name>
    <email>snowblink@gmail.com</email>
  </committer>
</commit>
