Arte.tv Plugin

I would like to try and create a plugin for arte-TV (German / French channel at http://plus7.arte.tv/ ) and while I think I have an overview on how to do this I already have some questions:


  1. Apparently the videos are limited by an IP-check to clients from these countries: (DE FR CH AT BE LU LI GP GF MQ RE PF PM WF YT NC TF). Could someone from outside these locations check what he gets to see when visiting http://plus7.arte.tv/ and send me the html so the plugin could check and handle the error?


  2. There are three possibilities on how to display the videos:
  • Load the html-page and display the Flash player using a site config file. This seems to be the most simple, although there could be some problem because the site switches between high quality / low quality and Flash / WMV using javascript.
  • Find out the URL of the Flash video and display this directly. The URL schema is rtmp, can Plex use this? (Example URL: rtmp://flashstreaming.plus7.arte.tv/ondemand/flash/arteprod/A7_SGT_ENC_10_040373-004-A_PG_MQ_DE.flv )
  • Find out the URL of the WMV video (streamed over http) and display this.



    Any hints on what would be the strategy that could create the least problems?

hi,

i can answer question no. 1, as i am unfortunately not allowed to view this content :frowning:

you can find the html reply on:

http://www.box.net/shared/2j58s7o72b

Thanks for the help. Apparently the decline message is only displayed in the Flash area, the html appears to be identical to what I get. Could you check if this page displays for you, this should be a basic html list of the available videos: http://plus7.arte.tv/fr/streaming-home/169…streaming.html



I had some success getting a wmv file from the site to play, I think I will follow this further. (The http link from the main site refers to an xml file of type asx, this contains an mms link, using that in a VideoItem in the menu plays it successfully)

yeah, it opens a page with a static image preview and a html link to each available video. after clicking the link a web page for the program opens with the player area covered with the decline message. the link looks like this:

http://plus7.arte.tv/fr/detailPage/1697660…Id=2497750.html

(that’s the link to the “Tracks” video)

Great success! The bundle works and is online: http://wiki.plexapp.com/index.php/Arte%2B7



Since the html pages apparently are identical whether you can watch videos or are outside of the filtered regions I didn’t include a check, you probably get the menus correctly and only get an error when displaying the video.



There is one problem I was not able to solve: Unicode characters aren’t displayed correctly in the menus. The pages I parse are originally encoded in UTF-8, I use XML.ElementFromString(HTTP.GetCached()) to read the page, then desc = detailPage.xpath(’//p[@class=“headline”]’)[0].text to get the description, and display this using dir.AppendItem(VideoItem(videoStreamUrl, name, desc, “”, thumbUrl)). The characters are unicode, they are displayed as two characters, for example (Ã"). Any hints on what I could do differently?


Unicode in Python can be quite difficult. Especially when you've got a mixed environment.
Use:

name=name.encode("iso-8859-1").decode("utf-8")<br />
desc=desc.encode("iso-8859-1").decode("utf-8")

before you create the Item, then it works.



Thanks, never again a missed episode of Karambolage :slight_smile:

That fixed it, thank you. I uploaded the new version with fixed umlauts and added video length in the lists.



I’m happy the plugin is useful for more people than just me :slight_smile:

Thank you for the Plugin, Arte is the only Channel that I missed since I abonded my TV.

thanks crxs!



love it :slight_smile:

It’s in the queue, should be up there in the next few days!

Hi,



please, where can I find the plugin??



wbr

Looks like the plug-in is broken … (INDEX error ==> see log)



If its there … you would find it in the AppStore … within PLEX



Here is the one I got: http://wiki.plexapp.com/index.php/Arte%2B7


I uploaded a new version (0.3) that works for me, if it doesn't please send me the error description from the log file.

I am still getting the INDEX error:





[codebox]15:18:40.034684: com.plexapp.plugins.artep7 : (Framework) Plugin initialized

15:18:40.035021: com.plexapp.plugins.artep7 : (Framework) Debugging is enabled

15:18:40.036143: com.plexapp.plugins.artep7 : (Framework) Loaded default preferences

15:18:40.037610: com.plexapp.plugins.artep7 : (Framework) Plugin dictionary unpickled

15:18:40.038788: com.plexapp.plugins.artep7 : (Framework) Loaded en strings

15:18:40.038965: com.plexapp.plugins.artep7 : (Framework) Couldn’t find en-us strings

15:18:40.137405: com.plexapp.plugins.artep7 : (Framework) Loaded cookie jar

15:18:40.144736: com.plexapp.plugins.artep7 : (Framework) Imported plugin module

15:18:40.144845: com.plexapp.plugins.artep7 : (Framework) Attempting to start the plugin…

15:18:40.145560: com.plexapp.plugins.artep7 : (Framework) Adding request handler for prefix ‘/video/artep7’

15:18:40.146078: com.plexapp.plugins.artep7 : (Framework) Adding view group ‘Menu’

15:18:40.146466: com.plexapp.plugins.artep7 : (Framework) Plugin started

15:18:40.146842: com.plexapp.plugins.artep7 : (Framework) Entering run loop

15:18:40.147234: com.plexapp.plugins.artep7 : (Framework) Handling request : /:/prefixes

15:18:40.147787: com.plexapp.plugins.artep7 : (Framework) Exposed resource named ‘icon-default.png’ as ‘image/png’

15:18:40.147950: com.plexapp.plugins.artep7 : (Framework) Exposed resource named ‘art-default.png’ as ‘image/png’

15:18:40.148462: com.plexapp.plugins.artep7 : (Framework) Response OK

15:18:40.149833: com.plexapp.plugins.artep7 : (Framework) Handling request : /:/prefixes

15:18:40.150108: com.plexapp.plugins.artep7 : (Framework) Response OK

15:25:28.012912: com.plexapp.plugins.artep7 : (Framework) Handling request : /video/artep7

15:25:28.028297: com.plexapp.plugins.artep7 : (Framework) Response OK

15:25:30.912812: com.plexapp.plugins.artep7 : (Framework) Handling request : /video/artep7/de/Top7

15:25:32.565929: com.plexapp.plugins.artep7 : (Framework) Saved ‘http://plus7.arte.tv/de/streaming-home/1698112,templateId=renderCarouselHTML,CmPage=1697480,filter=top7,CmPart=com.arte-tv.streaming.html’ to the cache

15:25:33.615098: com.plexapp.plugins.artep7 : (Framework) Saved ‘http://plus7.arte.tv/de/detailPage/1697660,CmC=2605488,scheduleId=2568422.html’ to the cache

15:25:33.620467: com.plexapp.plugins.artep7 : (Framework) An exception happened:

Traceback (most recent call last):

File “/Users/plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/0/Python/PMS/Plugin.py”, line 454, in __run

result = handler(pathNouns, count)

File “/Users/plex/Library/Application Support/Plex Media Server/Plug-ins/arte+7.bundle/Contents/Code/init.py”, line 53, in HandleRequest

return GetMenuTopSeven(pathNouns[0])

File “/Users/plex/Library/Application Support/Plex Media Server/Plug-ins/arte+7.bundle/Contents/Code/init.py”, line 92, in GetMenuTopSeven

AddEntriesFromListPage(GetArtePath(lang) + URL_TOP, dir)

File “/Users/plex/Library/Application Support/Plex Media Server/Plug-ins/arte+7.bundle/Contents/Code/init.py”, line 165, in AddEntriesFromListPage

javascript = detailPage.xpath(’//div[@id=“content”]/script’)[0].text

IndexError: list index out of range



[/codebox]



I also wanted to know if the streams you get are downloading very SLOW?

Hi FLOW,



I have a 50 Mbit line … and it is slow too … but “good” to know that this is a PROVIDER issue.



I was not able to get this up and running … see my post above … I will try it again … delete and re-install the arte plugin.



I also get double entries using my own plug-in COMPIZmediacenter So I think this must be a PROVIDER issue too.



The quality of the streams are low res too … no matter what you select … unfortunately I am not able to see the version right off the ARTE web site, because I am coming from a US-based network.



Flow, or someone else, please can you try it and let us know if the plug-in supplied streams are really the same as the ones you get going “officially” through the Arte website?!



Thanks


Thank you!

Unfortunately there is not much I can do about the problems:

The multiple entries are something arte-tv does, if you look at their page the entries also occur multiple times in their lists. Apparently they count multiple broadcasts on tv as different items and put both into the list. If I go to Wednesdays page on [http://plus7.arte.tv/](http://plus7.arte.tv/) for example, I get two entries for "Karambolage": One from 04:40, one from 06:45.

Do you mean slow on loading the lists of programs or slow on starting playing the movies? The lists can be a bit slow because I have to visit each detail page for each movie to get the description text, so there is a lot going on in the background. The speed of starting to movies is responsibility of Plex itself, it first caches a lot to keep playback smooth, I think you could change the caching in the Plex configuration.

I generally play the high quality Windows Media version, if no high quality is available I fall back to the low quality version. So it can depend on what arte has available, some videos only have low quality, but that is also the same if you go to the web page.

Edit: You could try the 0.4 version linked below and look into the log file to see if low quality streams are used.

Ah, that could be an explanation why I don't get the exception you get. Apparently videos you can't access still exist in the list page, but on the detail page the script tag to create the player is missing. I created a version that should now simply ignore entries where the detail page is unusable, with this you should get the lists without error. Pages that can't be read are written into the log as "Error (exception type) reading detail page", so you can check what you don't get.

It's also possible that you could only get the lower quality streams, but that's hard to determine from here. This version now writes the text "No HQ video file, trying MQ" into the log file if only a low quality video file is available, you could check for that to see what you really get. If you post the page names I could check what quality I have in the pages.

arte_7.bundle.v0.4.zip (53.9 KB)


[http://www.m6replay.fr/rss/rssflash.xml](http://www.m6replay.fr/rss/rssflash.xml)

Not that I can understand anything on that page but it might help you guys :)

I love the Arte.tv plugin !

And, I'm having a look at the Canalplus player...
It's barely possible to do something. I just need a bit of help with XML parsing and Code.
I'm a newbie, but I think I can help.

First,
We got the url of the XML that list all the different theme (this could the first menu of the plugin) :
[http://webservice.canal-plus.com/rest/bigplayer/initPlayer](http://webservice.canal-plus.com/rest/bigplayer/initPlayer)

Inside this one you can find :

<?xml version="1.0" encoding="UTF-8"?>



recherchep





3
SELECTION CANAL
/pid1744-c-accueil.html?
#FFFFFF








1
LES INCONTOURNABLES

selectionp





4
SPORT
/pid1747-c-sport.html?
#33FF33

SPORT






2
LES INCONTOURNABLES

sportp



73
LES PLUS RECENTES

sportp



72
LES PLUS VUES

sportp



3
TOUT LE FOOTBALL

sportp
....etc...

With that we have to parse the and of the different .
For example : The "Theme" number 1 (1) will be entitled "LES INCONTOURNABLES" (LES INCONTOURNABLES)
or : The "Theme" number 73 (73) will be entitled "LES PLUS RECENTES" (LES PLUS RECENTES) (aka in English : the most recent.)

This will point to the second menu of the plugin which is the list of videos from a specific theme
The url then used for that is :
[http://webservice.canal-plus.com/rest/bigplayer/getMEAs/1](http://webservice.canal-plus.com/rest/bigplayer/getMEAs/1) (the 1 at the end is the ID of the Theme we want... it could have been of course 73 wink.gif )

inside this new xml you can find the different shows (called MEA here) :
<?xml version="1.0" encoding="UTF-8"?>


243452
VOD STREAM




1399

OUI
4
5












http://media.canal-plus.com/wwwplus/image/1/12/1/ZAPSPORT_EMISSION_GENERIQUE_1_image_H.jpg
http://media.canal-plus.com/wwwplus/image/1/12/1/ZAPSPORT_EMISSION_GENERIQUE_1_image_L.jpg



SPORT
ZAPSPORT
EMISSION



243393
VOD STREAM




24344

OUI
4.06
54












http://media.canal-plus.com/wwwplus/image/6/20/1/ZAPPING_EMISSION_090519_CAN_89460_image_H.jpg
http://media.canal-plus.com/wwwplus/image/6/20/1/ZAPPING_EMISSION_090519_CAN_89460_image_L.jpg



DOCUS ET INFOS
ZAPPING
EMISSION



243121
VOD PROG


So, here we can parse the infos of the many shows.
Example :
The show which ID is "243452" (243452) is entitled "Zapsport" ().
There is a description (),
and some thumbnails (Big (GRAND) and Small (PETIT)) (http://media.canal-plus.com/wwwplus/image/6/20/1/ZAPPING_EMISSION_090519_CAN_89460_image_H.jpghttp://media.canal-plus.com/wwwplus/image/6/20/1/ZAPPING_EMISSION_090519_CAN_89460_image_L.jpg).

There's no url for the video, and we need to parse another xml to find it.
this url is :
[http://webservice.canal-plus.com/rest/bigp...eosLiees/243452](http://webservice.canal-plus.com/rest/bigplayer/getVideosLiees/243452) (243452 at the end is the ID of the show smile.gif )

Inside the xml we will find the url if the video :

There you can find the various URL of the video.


and even a HD one wink.gif

And voila !
You just have to be aware of the accent and everything... french is a weird language !

Maybe, Isaac, Mr Mayor you can help us wink.gif

I decided to start a new topic…

Just to be simplier. :wink:



so follow the link :

http://forums.plexapp.com/index.php?showtopic=6467