And after the xpath you’d need to extract the url from the returned string. You can of course use a regular expression for this, but in this case you can also use a simple split and split the string on the single quote. This will return a list with 3 elements:
Thanks for the answers, look I have another trouble, that is my last line to get finish the plugin!!!
urlCapitulo = forElementos.xpath('//img')[0].get('onClick')
urlCapitulo = urlCapitulo[0]
If don't use the [0] in forElementos.xpath('//img')[0].get('onClick') don't run, but if use this code, the second line urlCapitulo = urlCapitulo.split("'")[1] doesn't works
Please help me, thank you
The error code is:
12/12/10 04:21:44 [0x0-0x783783].com.plexapp.plexmediaserver[12929] File "/Users/JC/Library/Application Support/Plex Media Server/Plug-ins/Tvolucion.bundle/Contents/Code/__init__.py", line 121, in videoIpad
It looks like the xpath isn’t returning a string that can be split into three pieces. Couple of things; first, the xpath predicate in your last message
//img
is different from that suggested
./img
. The one you posted will get all img tags in the whole document.The other will get children of forElementos.
Second, try using Log to print out the string returned from get to see if it can be split.
Hey Jonny I fixed the error this is the most stupid error
urlVideo = forElementos.xpath("./img")[0].get('onclick')
urlVideo = urlVideo.split("'")[1]
I write onClick and the correct is onclick
well I finished :) in some hours I will upload the plugin, but I have a question, how I insert the video when the format is mp4, you need the: http://www.plexapp.com/player/player.php?clip=
?
Is the video URL you have directly to an mp4 file? If so, they are the easiest to deal with. Just use VideoItem instead of WebVideoItem with the mp4 URL as the target.
Sorry for the time, just only I have some issues because Tvolucion, change some lines of code and this plugin is parsing html.
Please give me some days I recode the plugin.
Only some issues from this plugin:
Some section (or maybe all) have a problem with the “In your country you don’t play this video”. Is possible just USA, because have an agreement with Telemundo.
Only works 4 of 15:
The most recent
iPad Version (HD)
Foro TV (Discussion Threads)
News
Talk Soups
If I upload the plugin could get feedback, ideas, bug fixes, and for the Plex Online
Ok it’s the first version of TVolucion’s Plugin, some sections don’t have data because some videos was coded with a propietary format and any type of app wasn’t played, the format is QVT.
Well plz take ma back a feedback is my first app, not only on Plex, is on Phyton :)!
disculpa juan carlos soy nuevo en plex mac, como le puedo hacer para ver netflix en plex no encuentro algun tutorial o manera de instalar los plugins crees que sea molestia me expliques que hacer?