WebEPG with cookies (1 Viewer)

Vasek

Portal Member
December 13, 2006
47
4
48
Liberec
Home Country
Czech Republic Czech Republic
Hi,
because no good site with all czech tv programs was grabbable with WebEPG, I added small functionality: now COOKIES can be part of HTTPRequest of grabber (Site tag) the same way as UTL and POST attribute. It can contain the same replacable tags (like [ID] etc.). Such a way many new sites can be used for WebEPG.

Cookies atribute of Site tag can contain more cookies separated by semicolon ";". Each cookie is composed by its name and its value in form "cookieName=cookieValue". Other than main domain are not supported at the moment. See the following example:

<Site url="http://tv.sms.cz/index.php?P_id_kategorie=56456&amp;P_soubor=%2Ftelevize%2Findex.php%3Fdatum%3D[YYYY]-[MM]-[DD]%26zobrazeni%3D" post="" cookies="P_cookies_siroke_zobrazeni=false;P_cookies_televize_stanice=[ID]" external="false" encoding="windows-1250" />

Cookies in Site tag are supported only for external="false".

Only small changes in code were needed, influenced source files are attached. Performed change works for MP from at least version 0.2.3 to 1.0.0 (tested), only utils.dll must be compiled separately for 0.2.x series and 1.0.x series. Influenced source files for current SVN version, compiled Utils.dll needed for new feature for MP 0.2.3 and MP 1.0.0, and two examples are attached.

Attached files also contain the bug fix https://forum.team-mediaportal.com/general-development-no-feature-request-here-48/bug-fix-non-default-encoding-webepg-sublink-49583/ not yet merged to current SVN.

For using this new feature you can just copy Utils.dll of appropriate MP version to your main MP directory. Original Utils.dll should be backuped for safety purposes. MP should not be running during this operation (otherwise file is in use and cannot be replaced / renamed).

I thing this small improvement copies very exactly the principles of MP and adds much general improvement. It does not touch any other functionality of MP. I ask developers to add this new functionality to official versions.

Have a good time with MP!

Vasek
 

Attachments

  • Utils023.zip
    30.6 KB
  • Utils100.zip
    30.6 KB
  • tv_sms_cz.xml
    30.6 KB
  • www_ceskenoviny_cz.xml
    30.7 KB
  • src_Utils_Web_HTTP.zip
    30.7 KB

stanik

Portal Pro
October 10, 2006
146
4
Home Country
Czech Republic Czech Republic
Hi Vasku :)

Its perfect, but I have a problem with your uitls.dll for MP100.
I am already using latest SVN modified by Disaster123 and when I use you fixed utils, MP always crash in starting.

Cesky: Proste to vzdycky spadne kdyz MP chci spustit.
Slo by to upravit pro aktualni SVN? Posilam ti Utils co mam v MP a treba by sel modifikovat.
Diky moc
 

Attachments

  • Utils.rar
    30.6 KB

Vasek

Portal Member
December 13, 2006
47
4
48
Liberec
Home Country
Czech Republic Czech Republic
crash

Hi stanik,
it works for me in current SVN. James added the code to current SVN on sunday, so it should be in new SVN next weekend working.

V.
 

Khurram

Portal Pro
May 12, 2008
211
5
Home Country
Pakistan Pakistan
Thanks for creating this. I required the cookie functionality for one of my grabber and luckily came across your post in the WebEPG section. There is one little bug and one little request:

1) The code ignores the date tags if they in the cookies section because the HttpRequest.cs->HasTag() function doesnt not check for date tags in the cookies string.

2) WebEPG prints the url+post data it is grabbing data from in the log but not the cookie string. Please change the HttpRequest.cs->ToString() function to add this (if you think it is useful).

Perhaps this thread should be moved to the WebEPG section.
 

rak

Portal Pro
March 5, 2008
93
1
Home Country
Czech Republic Czech Republic
Hi Vasek,

thanks for the new WebEPG, it works great with ceskenoviny. However it looks like, that the xmltv parsed from ceskenoviny contains the whole description in the episode title. Sorry I do not know the syntax of xmltv, but this was told me here.
 

Vasek

Portal Member
December 13, 2006
47
4
48
Liberec
Home Country
Czech Republic Czech Republic
Hi Khurram,

thank you for your feedback. I'll look at it, it should not be the problem, however a bit later. I must finish my PhD thesis in coming weeks, so I'm sorry for now.

Hi rak,
according to the post you mentioned, there is short description in sub-title. It is problem. Short description very often contains i.e. episode sub-title, so it is on the right place. However sometimes there is longer text in sub.title place. However, it is in subtitle, not in the title. Title is always short and contains only title. if it is problem for you, grabber can be adopted, but how - I can either remove subtitle, but than episode sub-titles are lost, or I can remove description, move sub-title to description and use no sub-title. What is the most suitable for you?

V.
 

Vasek

Portal Member
December 13, 2006
47
4
48
Liberec
Home Country
Czech Republic Czech Republic
tv.sms.cz update

Hi everybody,
there was small change on web pages, here is the update of grabber...

Vasek
 

Attachments

  • tv_sms_cz.xml
    30.6 KB

Vasek

Portal Member
December 13, 2006
47
4
48
Liberec
Home Country
Czech Republic Czech Republic
Prima Cool

Hi folks,
here is a new update of tv.sms.cz grabber containing Prima Cool and new programs for Skylink platform from 1.4.2009.
Vasek
 

Attachments

  • tv_sms_cz.xml
    30.6 KB

Users who are viewing this thread

Top Bottom