Página 2 de 3

Re: 3 italian channel (PLEASE!)

Publicado: 26 Ago 2010, 23:10
por otherman
jurrabi escribió:Do you know any reason to keep the .*? ???
honestly, I don't know :roll:

Re: 3 italian channel (PLEASE!)

Publicado: 27 Ago 2010, 01:16
por jurrabi
Ok. I finally got a fix for number 2: problems with codes in Title names.

The text is coded with utf-8 and using HTML Decimal Entities to represent some special characters (like n-dash coded like &#8211).

I couln't find any standard library in 2.4 (the python vesrion inbebed in XBMC) but I found this small elegant procedure to change all HTML entities into the respective unicode chars (thanks Fredrik Lundh)

So, because the text is coded with utf-8, the procedure returns unicode and the plugin is coded with latin1 we have to do the following:

Convert (decode) the title to unicode so de unscapeprocedure will work and return a unicode string. then, we have to reencode but this time to latin1. Because we might find characters that where in the page (in utf-8 or HTML Entities-unicode) that are not Latin1 compatible, we have to be sure we don't generate an encodig error.

The final code:

Código: Seleccionar todo

		UnicodeDecodedTitle = match[2].decode("utf-8")
		unescapedTitle = unescape (UnicodeDecodedTitle)
		scrapedtitle = unescapedTitle.encode("latin1","ignore") 
Let me say that the plugin right now it's a mess when it comes to strings management. Big deep changes must be done to be able to have a proper multilingual plugin...

First we need to change from latin1 (iso-8859-1) code page to utf-8. Then we need to start using xbmc strings to allow others to translate de plugin... and we need to modify al encode/decode operations to work fine with any code page... For now let it stay this way.

Re: 3 italian channel (PLEASE!)

Publicado: 27 Ago 2010, 01:34
por jurrabi
Ok. as the rest of the problems I don't see any film without cover or any systax error related to single or double quote...

I did fix a problem with the "avanti" link. So now you can go forward to the next page.

I don't see the need for a "indietro" link as going back in xbmc goes to the previous page...

I attached the modified file. I tried to change the minimal to let you recognize it.

Keep the good work.

jur.

Re: 3 italian channel (PLEASE!)

Publicado: 27 Ago 2010, 11:50
por otherman
new question for a new channel:
how can I set a range between two piece of code in which to search recursive expressions (rather than the whole page)?

Re: 3 italian channel (PLEASE!)

Publicado: 27 Ago 2010, 22:41
por jurrabi
When you say :
how can I set a range between two piece of code in which to search recursive expressions (rather than the whole page)?
I don't understand what you mean by two pieces of code. I call code to your channel program (in python). But I'm not sure if you mean pieces of data (the html data of the page).

I also don't understand what you mean by recursive... by definition regexp search for all occurrences in the data you provide. That data doesn't have to be the hole page. You can cut the page using string manipulation functions (split, search, etc).

But I can't be specific to such a generic question.

I stand recommending the python tutorial. That will give you a minimal set of tools to keep going.
Also, if you want I recomend reviewing the channel code of tvshack. It does some advanced things that might give you ideas... For example in that channels page, the episodes of a TV Series doesn't have the full episode reference (sXXeXX) in each episode. Instead it has a title for the season and then lists all the episodes for that season with a single number. The channel splits de data page into sections for each season and then recreates the full episode reference.

Re: 3 italian channel (PLEASE!)

Publicado: 27 Ago 2010, 23:21
por otherman
I know, I've to study python, but now I've not the time, maybe in a month... I'm using my little free time to experiment. Thanks for your help and suggestion!
I've added the alfabetic list for now, and it works :lol: one step at a time ;)

P.s. Yes, with "piece of code" I mean "html data"

Re: 3 italian channel (PLEASE!)

Publicado: 29 Ago 2010, 12:06
por otherman
New version of my channel
changes are:
"plot" added
"Per Letter list" added (the original site has not a true alphabetical order, sorry)
"Series" added (needs more works)
"anime" added (needs more works)
"Search movie" added

And I need help here..
The url for movies search is an easy http://cineblog01.com/film/?s=TEXT
but for serise is http://cineblog01.com/serietv/?s=TEXT&submit=TROVA!
and for anime is http://cineblog01.com/anime/?s=TEXT&submit=TROVA!


than the "searchUrl = "http://cineblog01.com/film/?s="+tecleado" for movies, what become for series and anime?
Maybe "searchUrl = "http://cineblog01.com//serietv/?s="+tec ... bmit=TROVA! ?

Re: 3 italian channel (PLEASE!)

Publicado: 16 Sep 2010, 10:44
por jesus
I miss your question, sorry :(

The correct sentence is:

Código: Seleccionar todo

searchUrl = "http://cineblog01.com//serietv/?s="+tecleado+"&submit=TROVA!"
Do you want to include these channels in the next release of pelisalacarta? It seems a very complete channel now :)

Re: 3 italian channel (PLEASE!)

Publicado: 16 Sep 2010, 13:43
por jurrabi
Now more than ever jesus I think we need too work in an option to filter channels by language. And maybe three option to mark and filter by favorites...

Re: 3 italian channel (PLEASE!)

Publicado: 16 Sep 2010, 17:21
por jesus
It's already on the to-do list ;)