FAQ  •  Register  •  Login

BBC iPlayer (UK only)

<<

zip

User avatar

Serviio developer / Site Admin

Posts: 16372

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Sep 22, 2011 7:59 pm

BBC iPlayer (UK only)

iPlayer plugin (requires Serviio 1.6.1 and newer)

This is a plugin that enables to watch iPlayer content using the following URL structures:

Categories
  Code:
http://www.bbc.co.uk/iplayer/categories/documentaries/highlights
http://www.bbc.co.uk/iplayer/categories/documentaries-history/highlights


Groups / collections
  Code:
http://www.bbc.co.uk/iplayer/group/b06z98k4
http://www.bbc.co.uk/iplayer/group/p02j4np8


Episodes (id comes from the programme URL)
  Code:
http://www.bbc.co.uk/iplayer/episodes/b006m86d



Added 22/9/2011
Updated for 0.6.1 5/1/2012
Updated 14/12/2012 (thanks to pineson)
Updated 9/6/2013
Updated 30/3/2016
Updated 29/06/2016
Attachments
IPlayer.groovy
(15.35 KiB) Downloaded 235 times
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 16372

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Mar 30, 2016 8:07 pm

Re: BBC iPlayer (UK only)

Updated the plugin
<<

markstuartwalker

Serviio newbie

Posts: 8

Joined: Tue May 31, 2016 4:41 am

Post Tue May 31, 2016 4:45 am

Re: BBC iPlayer (UK only)

Thank you this plugin - it works great for the episodes that I want but I am struggling to get the categories function to work.

http://www.bbc.co.uk/iplayer/categories ... highlights
http://www.bbc.co.uk/iplayer/categories ... highlights

Have the BBC moved things around and broken things?
<<

markstuartwalker

Serviio newbie

Posts: 8

Joined: Tue May 31, 2016 4:41 am

Post Fri Jun 03, 2016 7:04 am

Re: BBC iPlayer (UK only)

I have looked at the Groovy code and can trace that there is a function to handle categories but I cannot get the logging to work to diagnose any further.

This is likely to be a novice problem. Can anyone help me with this?
<<

Xmantium

User avatar

DLNA master

Posts: 1418

Joined: Sat Jul 23, 2011 2:12 pm

Location: Manchester, UK

Post Sun Jun 12, 2016 9:11 pm

Re: BBC iPlayer (UK only)

Episodes work fine, cant get categories to work.
Sony Bravia 2010 52NX803 - Sony PS3 - Xbox 360
Serviio running on QNAP NAS 639 Pro - 1.6 Intel Dual Core - 2GB RAM and QNAP NAS 121 - 2Ghz ARM Marvell - 1GB RAM
Console using ServiiDroid for Android, ServiiMetro and ServiiWP for Windows Phone and WebUI for iOS
<<

markstuartwalker

Serviio newbie

Posts: 8

Joined: Tue May 31, 2016 4:41 am

Post Mon Jun 13, 2016 7:31 am

Re: BBC iPlayer (UK only)

Agreed. Same as my problem.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 16372

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Jun 21, 2016 1:14 pm

Re: BBC iPlayer (UK only)

What URL are you using for categories?
<<

markstuartwalker

Serviio newbie

Posts: 8

Joined: Tue May 31, 2016 4:41 am

Post Tue Jun 28, 2016 1:55 pm

Re: BBC iPlayer (UK only)

See my post above

http://www.bbc.co.uk/iplayer/categories ... highlights

Doesn't retrieve anything for me
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 16372

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Jun 28, 2016 9:06 pm

Re: BBC iPlayer (UK only)

Try this URL (instead of the grid, it's the a-z link on top right)

http://www.bbc.co.uk/iplayer/categories ... ?sort=atoz
<<

markstuartwalker

Serviio newbie

Posts: 8

Joined: Tue May 31, 2016 4:41 am

Post Wed Jun 29, 2016 7:06 am

Re: BBC iPlayer (UK only)

Excellent! That fixed that example.

But the one that I was really trying to access was

http://www.bbc.co.uk/iplayer/categories ... ?sort=atoz

And that must be different in some way as I get nothing.

I finally worked out how to look at the logging and realised that an exception was being raised when converting the release date. The BBC were being a little lazy in just putting in '1958' instead of '14 Feb 1958' and this was breaking the SimpleDateFormat parsing.

def releasedMatcher = li =~ '(?ms)<span class="release">.*?First shown:\\s*(.*?)\\n.*?</span>'
if(releasedMatcher) {
String releaseDateString = releasedMatcher[0][1]
releaseDate = new SimpleDateFormat('dd MMM yyyy').parse(releaseDateString)
}

I bodged in a fixed date and this solved the problem (except of course they all now show the same date). I'll let the author fix this more elegantly.

def releasedMatcher = li =~ '(?ms)<span class="release">.*?First shown:\\s*(.*?)\\n.*?</span>'
if(releasedMatcher) {
String releaseDateString = releasedMatcher[0][1]
releaseDateString = '1 Jan 1958'
releaseDate = new SimpleDateFormat('dd MMM yyyy').parse(releaseDateString)
}
<<

markstuartwalker

Serviio newbie

Posts: 8

Joined: Tue May 31, 2016 4:41 am

Post Wed Jun 29, 2016 10:54 am

Re: BBC iPlayer (UK only)

Finally, the adoption of all?sort=atoz introduced a fault on the pagination mechanism. I had to add the third line here to suppress an '&amp;' in the URL.

pageBaseUrl = lastPageMatcher[0][1]
totalPages = lastPageMatcher[0][2].toInteger()
pageBaseUrl = pageBaseUrl.replace('amp;','')
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 16372

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Jun 29, 2016 7:23 pm

Re: BBC iPlayer (UK only)

I've fixed the first bit, cannot reproduce the error with pagination - works for me. Updated the plugin in the top post.
<<

markstuartwalker

Serviio newbie

Posts: 8

Joined: Tue May 31, 2016 4:41 am

Post Thu Jun 30, 2016 1:10 pm

Re: BBC iPlayer (UK only)

Thank you. I have confirmed that date is fixed. You might like to consider modifying other parts of the code where the same date parsing is done.

Try http://www.bbc.co.uk/iplayer/categories ... ?sort=atoz

And observe the first page collecting alphabetically (approximately A-G) and then collecting the first page again rather than page 2.

Enhancing the logging to log("Loading page " +'http://www.bbc.co.uk' + pageBaseUrl + page)
shows the incorrect URL being used.
http://www.bbc.co.uk/iplayer/categories ... amp;page=2
when it should be
http://www.bbc.co.uk/iplayer/categories ... toz&page=2

I suspect that you somehow aren't using the sort=atoz parameter to force the screen to a simple list.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 16372

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Jun 30, 2016 7:10 pm

Re: BBC iPlayer (UK only)

Thanks, updated
<<

markstuartwalker

Serviio newbie

Posts: 8

Joined: Tue May 31, 2016 4:41 am

Post Fri Jul 01, 2016 11:41 am

Re: BBC iPlayer (UK only)

Fixed! Thank you.
<<

JamezG

Serviio newbie

Posts: 1

Joined: Tue Oct 04, 2016 4:04 pm

Post Tue Oct 04, 2016 4:58 pm

Re: BBC iPlayer (UK only)

Hi, As I am now unable to get BBC Iplayer on my Sony Bravia TV (KDL-40EX703), I am trying Serviio ( Prov1.7) to provide access but I am encountering a few problems and I therefore need some help. I have followed the instructions in your posts thank you very much (downloaded the .groovy files, Inserted the URLs as written as a web resource) but:
1. The Episodes elements (including trying the Eastenders Example as written) does not show any episodes. My TV shows the online Display Name in the 'Online' folder but when I select that folder I get ' There are no items to display'
2. The Categories elaments work to a degree but I only get the the first page of files (as shown on the PC iplayer page) displayed on my TV. I have been using the '/all?sort=atoz' parameter at the end of the url but I do not have any item on the screen to select further pages

PS why can I not paste URLs in to the Serviio Console librarys?

Return to Available plugins

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.