The branch, dharma has been updated
       via  f81b0bfa021c0bc23b621722dad3a66902af9ab7 (commit)
      from  39ab7af1d1eabe3f8fc0a7d25fdad4f0fb382eda (commit)

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

commit f81b0bfa021c0bc23b621722dad3a66902af9ab7
Author: spiff <[email protected]>
Date:   Tue Nov 29 10:26:23 2011 +0100

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

diff --git a/plugin.video.ted.talks/addon.xml b/plugin.video.ted.talks/addon.xml
index 207c171..1cc7003 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.3"
+       version="2.2.4"
        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 ed185a0..cd37a90 100644
--- a/plugin.video.ted.talks/changelog.txt
+++ b/plugin.video.ted.talks/changelog.txt
@@ -1,3 +1,8 @@
+[B]Version 2.2.4[/B]
+Fixed newest talks - handle unicode characters (thanks to moreginger)
+Fixed newest talks - prev/next buttons not showing (thanks to helmut mikulcik)
+Fixed favorites - not working (thanks to jherrob a gmail com)
+
 [B]Version 2.2.3[/B]
 Ted talks moved most videos to youtube
 
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 deef021..69ddd4a 100644
--- a/plugin.video.ted.talks/resources/lib/ted_talks_scraper.py
+++ b/plugin.video.ted.talks/resources/lib/ted_talks_scraper.py
@@ -11,7 +11,7 @@ URLSPEAKERS = 'http://www.ted.com/speakers/atoz/page/'
 URLNEW = 'http://www.ted.com/talks/list/page/'
 URLSEARCH = 'http://www.ted.com/search?q=%s/page/'
 URLLOGIN = 'http://www.ted.com/users/signin/'
-URLPROFILE = 'http://www.ted.com/profiles/view/id/'
+URLPROFILE = 'http://www.ted.com/profiles/'
 URLFAVORITES = 'http://www.ted.com/profiles/favorites/id/'
 URLADDFAV ='http://www.ted.com/profiles/addfavorites?id=%s&modulename=talks'
 URLREMFAV ='http://www.ted.com/profiles/removefavorites?id=%s&modulename=talks'
@@ -26,12 +26,12 @@ class TedTalks:
         navItems = {'next':None, 'previous':None, 'selected':1}
         paginationContainer = SoupStrainer(attrs = 
{'class':re.compile('pagination')})
         for liTag in BeautifulSoup(html, parseOnlyThese = 
paginationContainer).findAll('li'):
-            if liTag.a.has_key('class'):
-                if liTag.a['class'] == 'next':
+            if liTag.has_key('class'):
+                if liTag['class'] == 'next':
                     navItems['next'] = URLTED+liTag.a['href']
-                elif liTag.a['class'] == 'previous':
+                elif liTag['class'] == 'prev':
                     navItems['previous'] = URLTED+liTag.a['href']
-                elif liTag.a['class'] == 'selected':
+                elif liTag['class'] == 'selected':
                     navItems['selected'] = int(liTag.a.string)
             else: #no class attrib found.
                 print '[%s] %s no pagination found.' % (pluginName, __name__)
@@ -94,7 +94,7 @@ class TedTalks:
             form = forms[1]
             form["users[username]"] = self.username
             form["users[password]"] = self.password
-            form["users[rememberme]"] = ['1']
+            form["users[rememberme]"] = ["on"]
             #click submit
             return getHTML(form.click())
 
@@ -195,7 +195,7 @@ class TedTalks:
                 html = getHTML(url+user.id)
                 talkContainer = SoupStrainer(attrs = {'class':re.compile('box 
clearfix')})
                 for talk in BeautifulSoup(html, parseOnlyThese = 
talkContainer):
-                    title = talk.h4.a.string
+                    title = talk.ul.a.string
                     link = URLTED+talk.dt.a['href']
                     pic = resizeImage(talk.find('img', attrs = 
{'src':re.compile('.+?\.jpg')})['src'])
                     yield {'url':link, 'Title':title, 'Thumb':pic}
diff --git a/plugin.video.ted.talks/resources/lib/util.py 
b/plugin.video.ted.talks/resources/lib/util.py
index 2732d9e..7b08328 100644
--- a/plugin.video.ted.talks/resources/lib/util.py
+++ b/plugin.video.ted.talks/resources/lib/util.py
@@ -53,8 +53,8 @@ def cleanHTML(s, noBS=False):
     if not noBS:
         tmp = list()
         for ns in s:
-            tmp.append(str(ns))
-        s = ''.join(tmp)
+            tmp.append(unicode(ns))
+        s = u''.join(tmp)
     s = re.sub('\s+', ' ', s) #remove extra spaces
     s = re.sub('<.+?>|Image:.+?\r|\r', '', s) #remove htmltags, image 
captions, & newlines
     s = s.replace('&#39;', '\'') #replace html-encoded single-quotes

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

Summary of changes:
 plugin.video.ted.talks/addon.xml                   |    2 +-
 plugin.video.ted.talks/changelog.txt               |    5 +++++
 .../resources/lib/ted_talks_scraper.py             |   14 +++++++-------
 plugin.video.ted.talks/resources/lib/util.py       |    4 ++--
 4 files changed, 15 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to