The branch, dharma has been updated
       via  79d4fb07f7e53c22893610ae5a4517d54d9a0be7 (commit)
      from  ac3d21a83aac7ff4a5bb7922ea3d3c17a3245a05 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=79d4fb07f7e53c22893610ae5a4517d54d9a0be7

commit 79d4fb07f7e53c22893610ae5a4517d54d9a0be7
Author: spiff <[email protected]>
Date:   Tue Nov 15 14:12:23 2011 +0100

    [plugin.video.ted.talks] updated to version 2.2.3

diff --git a/plugin.video.ted.talks/addon.xml b/plugin.video.ted.talks/addon.xml
index b9a00ee..207c171 100644
--- a/plugin.video.ted.talks/addon.xml
+++ b/plugin.video.ted.talks/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.video.ted.talks"
        name="TED Talks"
-       version="2.2.2"
+       version="2.2.3"
        provider-name="rwparris2">
   <requires>
     <import addon="xbmc.python" version="1.0"/>
diff --git a/plugin.video.ted.talks/changelog.txt 
b/plugin.video.ted.talks/changelog.txt
index c900124..ed185a0 100644
--- a/plugin.video.ted.talks/changelog.txt
+++ b/plugin.video.ted.talks/changelog.txt
@@ -1,3 +1,6 @@
+[B]Version 2.2.3[/B]
+Ted talks moved most videos to youtube
+
 [B]Version 2.2.2[/B]
 
 - fixed: download link names (reqexp strings) changed
diff --git a/plugin.video.ted.talks/resources/lib/ted_talks_scraper.py 
b/plugin.video.ted.talks/resources/lib/ted_talks_scraper.py
index fecab67..deef021 100644
--- a/plugin.video.ted.talks/resources/lib/ted_talks_scraper.py
+++ b/plugin.video.ted.talks/resources/lib/ted_talks_scraper.py
@@ -41,6 +41,7 @@ class TedTalks:
         """self.videoDetails={Title, Director, Genre, Plot, id, url}"""
         #TODO: get 'related tags' and list them under genre
         html = getHTML(url)
+        url = ""
         soup = BeautifulSoup(html)
         #get title
         title = soup.find('span', attrs={'id':'altHeadline'}).string
@@ -52,6 +53,11 @@ class TedTalks:
         for link in soup.findAll('a'):
             if re.match('High-res video \(MP4\)' , str(link.string)):
                 url = link['href']
+        if url == "":
+          # look for utub link
+          utublinks = 
re.compile('http://(?:www.)?youtube.com/v/([^\&]*)\&').findall(html)
+          for link in utublinks:
+            url = 
'plugin://plugin.video.youtube/?action=play_video&videoid=%s' %(link)
         #get id from url
         id = url.split('/')[-1]
         return {'Title':title, 'Director':speaker, 'Genre':'TED', 'Plot':plot, 
'PlotOutline':plot, 'id':id, 'url':url}

-----------------------------------------------------------------------

Summary of changes:
 plugin.video.ted.talks/addon.xml                   |    2 +-
 plugin.video.ted.talks/changelog.txt               |    3 +++
 .../resources/lib/ted_talks_scraper.py             |    6 ++++++
 3 files changed, 10 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to