Issue 90 in xbmc-addons: TED plugin can't detect video URL for some talks

4 views
Skip to first unread message

xbmc-...@googlecode.com

unread,
Jan 22, 2012, 10:24:05 AM1/22/12
to xbmc-addo...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect OpSys-All

New issue 90 by moregin...@gmail.com: TED plugin can't detect video URL for
some talks
http://code.google.com/p/xbmc-addons/issues/detail?id=90

For example, the "Sonaar Luthra: Meet the Water Canary" talk fails to
detect either a normal or youtube link, and fails to play the stream:
---
Playlist Player: skipping unplayable item: 0, path
[plugin://plugin.video.ted.talks/?url=http%3A%2F%2Fwww.ted.com%2Ftalks%2Fsonaar_luthra_meet_the_water_canary.html&mode=playVideo&name=Sonaar+Luthra%3A+Meet+the+Water+Canary&icon=http%3A%2F%2Fimages.ted.com%2Fimages%2Fted%2Ff4a34816481a61de16753f720db4d7609dc4eb9e_389x292.jpg]
---

The html does contain at least one usable link:
---
If you are on a mobile device, you may be able to <a
href="http://download.ted.com/talks/SonaarLuthra_2011G.mp4">download the
video</a>
---

I've modified ted_talks_scraper.py to find it.
---
#get description:
plot = soup.find('p', attrs={'id':'tagline'}).string
#get url
#detectors for link to video in order of preference
linkDetectors = [
lambda l: re.compile('High-res video
\(MP4\)').match(str(l.string)),
lambda l:
re.compile('http://download.ted.com/talks/.+.mp4').match(str(l['href'])),
]
for link in soup.findAll('a'):
for detector in linkDetectors:
if detector(link):
url = link['href']
linkDetectors =
linkDetectors[:linkDetectors.index(detector)] # Only look for better
matches than what we have
break
---

If I get time later I'll get a checkout and generate a patch.

xbmc-...@googlecode.com

unread,
Jan 26, 2012, 7:01:57 PM1/26/12
to xbmc-addo...@googlegroups.com

Comment #1 on issue 90 by moregin...@gmail.com: TED plugin can't detect

Patch for git://xbmc.git.sourceforge.net/gitroot/xbmc/plugins

Attachments:
1.patch 1.3 KB

xbmc-...@googlecode.com

unread,
Jan 27, 2012, 4:13:15 AM1/27/12
to xbmc-addo...@googlegroups.com

Comment #2 on issue 90 by peru.iz...@gmail.com: TED plugin can't detect
Check list!

Me lo estoy currando. Me suscrib� a las noticias de desarrolladores para el
XBMC

Dicho de otra manera, creo que ya han encontrado soluci�n para subt�tulos
en TED Talks visto en el appleTV



El 27/01/2012, a las 01:01, xbmc-...@googlecode.com escribi�:

xbmc-...@googlecode.com

unread,
Jan 27, 2012, 4:59:39 AM1/27/12
to xbmc-addo...@googlegroups.com

Comment #3 on issue 90 by moregin...@gmail.com: TED plugin can't detect
video URL for some talks
http://code.google.com/p/xbmc-addons/issues/detail?id=90

> Check list!
Could you be more specific?

> Me lo estoy currando. Me suscrib� a las noticias de desarrolladores para
> el XBMC

> Dicho de otra manera, creo que ya han encontrado soluci�n para subt�tulos
> en TED
> Talks visto en el appleTV
Did you intend to attach this comment here? Perhaps it belongs in another
issue?

xbmc-...@googlecode.com

unread,
Jan 27, 2012, 5:24:47 AM1/27/12
to xbmc-addo...@googlegroups.com

Comment #4 on issue 90 by peru.iz...@gmail.com: TED plugin can't detect

Sorry. I have deleted my comment, that I sent by mistake. The message was
for another recipient.

Thank you for developing anyway.

xbmc-...@googlecode.com

unread,
Jan 30, 2012, 7:27:47 PM1/30/12
to xbmc-addo...@googlegroups.com

Comment #5 on issue 90 by moregin...@gmail.com: TED plugin can't detect

Patch was applied in 2.2.5.

Reply all
Reply to author
Forward
0 new messages