You are here

Add personal icon joining 2 XML files

15 posts / 0 new
Last post
Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years
Add personal icon joining 2 XML files

I am joining 2 xml file, using the script http://www.webgrabplus.com/sites/default/files/download/ini/info/zip/Misc_merge-xmltv.zip

The source files have not any logo to grab. I want add my personal logo at every channel. Some channels are made with the tag "same_as="

What's the way to do it? I am thinking to use by name of the channel the field "config_site_id" .

So, I like if every channel have one tag like http://www.my-website.com/logos/"config_site_id"

Is it possible do it?

Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years

You are great like usually, I will try soon your suggestion.

The file where I am taking the data is the rytec in italian version.

My bigger trouble is I am living in Indonesia and I am interest about Italian data. Many italian websites, like Mediaset, ban the Indonesian IP so the grabbing proces sometime is ok and the most of time fail. My best solution actually is download the rytec file and join the miss channel of mediaset to the channels grabbed with webgrab and usually rytec have not logos :P By my self I found only the way to add the icon at the main channel and not all channels like +1, +2, +3 ecc...

Many troubles becuse I am not in the country where I want grab the data.

Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years

You are really the best always. I wrote to Willy, but him answered me, rytec doesn't support IPTV and specially Kodi because him had many troubles about and don't want take care anymore.

Blackbear199 wrote:

here's a ini with everything added as the forum messed up some stuff in the section you need to add.

i also added something so that if there happens to be multiple channel icon sources it only keeps the first one so make sure your xml with your logo's is the first file in the subpage.format {list...} so it uses that logo if other xml being merged also has one.

you could always ask Willy(doglover) if its possible to add logo.he creates the rytec epg.

 

Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years

I made some test and is not working. Probably I did one error somewhere. I took your original file and I modified like this:

**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: merge-xmltv
* @MinSWversion: 1.1.1/56.02
* @Revision 2 - [21/10/2015] Francis De Paemeleere
*   - speedup for large files
* @Revision 1 - [17/10/2015] Jan van Straaten
*   -  allows multiple xmltv input file to merge
* @Revision 0 - [09/05/2014] Jan van Straaten
*   - creation
* @Remarks:
* @header_end
**------------------------------------------------------------------------------------------------
*** edit - timezone=UTC+00:00 - to the timezone for which the xmltv data is created
*** edit (optional) - cultureinfo=en-GB - to the cultureinfo of the country for which the xmltv data is created
* site {url=merge-xmltv|timezone=UTC+00:00|maxdays=31.1|cultureinfo=en-GB|charset=UTF-8|titlematchfactor=90|keepindexpage}
site {url=merge-xmltv|timezone=Europe/Rome|maxdays=7|cultureinfo=it-IT|charset=UTF-8|titlematchfactor=90|keepindexpage}
*
*** set episodesystem preference,onscreen or xmltv_ns
*site {ratingsystem=GB|episodesystem=onscreen}
site {ratingsystem=IT|episodesystem=onscreen}
*
*** edit - path_of_the_xmltv_file2merge.xml - to your requirements
*** more than one file2merge or just one:
*subpage.format {list|path_of_the_1st_xmltv_file2merge.xml|path_of_the_2nd_xmltv_file2merge.xml|etc}
*** example
*subpage.format {list|D:\guide-1.xml|D:\guide-2.xml}
subpage.format {list|C:\ProgramData\ServerCare\data\rytec\rytecxmltvSkyIT.xml|C:\ProgramData\ServerCare\data\rytec\loghi.xml}
url_index{url|file://|subpage|}
*
scope.range {(datelogo)|end}
index_variable_element.modify {set|'config_site_id'}
index_variable_element.modify {cleanup(style=regex)}
index_urlchannellogo.scrub {single(includeblock="id="'index_variable_element'")|<channel|<icon src="http://d57e32cb.static.ziggozakelijk.nl/%7C" />|</channel>}
index_urlchannellogo.modify {substring(not "" type=element)|0 1}
end_scope
*
index_variable_element.modify {replace|&|&amp;}
index_variable_element.modify {replace|'|&apos;}
index_variable_element.modify {replace|"|&quot;}
index_showsplit.scrub {regex||<programme [^>]*channel=\"'index_variable_element'\"[^>]*>.*?</programme>||}
*
index_start.scrub {single|start="||"|>}
index_stop.scrub {single|stop="||"|>}
index_title.scrub {single|<title|>|</title>|</title>}
index_subtitle.scrub {single|<sub-title|>|</sub-title>|</sub-title>}
index_description.scrub {single|<desc|>|</desc>|</desc>}
index_actor.scrub {multi|<actor>||</actor>|</actor>}
index_director.scrub {multi|<director>||</director>|</director>}
index_writer.scrub {multi|<writer>||</writer>|</writer>}
index_producer.scrub {multi|<producer>||</producer>|</producer>}
index_presenter.scrub {multi|<presenter>||</presenter>|</presenter>}
index_productiondate.scrub {single|<year>||</year>|</year>}
index_category.scrub {multi|<category|>|</category>|</category>}
index_rating.scrub {multi|<rating|<value>|</value>|</rating>}
index_starrating.scrub {single|<star-rating>|<value>|</value>|</star-rating>}
index_episode.scrub {single(pattern="S'S1'/'St1' E'E1'/'Et1' P'P1'/'Pt1'""'S0'/'St1'.'E0'/'Et1'.'P0'/'Pt1'")|<episode-num|>|<|/episode-num>}
index_showicon.scrub {single|<programme|<icon src="http://d57e32cb.static.ziggozakelijk.nl/%7C" />|</programme>}
*
index_title.modify {cleanup(style=htmldecodespecialchar)}
index_subtitle.modify {cleanup(style=htmldecodespecialchar)}
index_description.modify {cleanup(style=htmldecodespecialchar)}
index_actor.modify {cleanup(style=htmldecodespecialchar)}
index_director.modify {cleanup(style=htmldecodespecialchar)}
index_writer.modify {cleanup(style=htmldecodespecialchar)}
index_producer.modify {cleanup(style=htmldecodespecialchar)}
index_presenter.modify {cleanup(style=htmldecodespecialchar)}
index_category.modify {cleanup(style=htmldecodespecialchar)}
*
*operations
scope.range {(indexshowdetails)|end}
* extraxt times
*start="20120922004200" stop="20120922021200"
index_start.modify {substring(type=char)|8 4}
index_temp_1.modify {substring(type=char)|'index_start' 0 2} * the hours
index_start.modify {substring(type=char)|2 2} * the minutes
index_start.modify {addstart|'index_temp_1':}
index_stop.modify {substring(type=char)|8 4}
index_temp_1.modify {substring(type=char)|'index_stop' 0 2} * the hours
index_stop.modify {substring(type=char)|2 2} * the minutes
index_stop.modify {addstart|'index_temp_1':}
*
index_description.modify {cleanup}
end_scope

**  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _
**      #####  CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
** @auto_xml_channel_start
*index_site_id.scrub {regex||<channel [^>]*id="[^\"]*"[^>]*>.*?</channel>||}
*scope.range {(channellist)|end}
*index_site_channel.modify {addstart|'index_site_id'}
*index_site_id.modify {substring(type=regex)|<channel [^>]*id="([^\"]*)"[^>]*>}
*index_site_id.modify {cleanup(style=htmldecodespecialchar)}
*index_site_channel.modify {substring(type=regex)|<display-name [^>]*>(.*?)</display-name>}
*index_site_channel.modify {cleanup(style=htmldecodespecialchar)}
*index_site_id.modify {cleanup(removeduplicates=equal link="index_site_channel")}
*end_scope
** @auto_xml_channel_end

And I made my loghi.xml file like this:

<?xml version="1.0" encoding="UTF-8"?>
<tv generator-info-name="WebGrab+Plus/w MDB &amp; REX Postprocess -- version  V1.57 -- Jan van Straaten" generator-info-url="h_tt_p://w_w_w.webgrabplus.com">
  <channel id="Rai 1">
    <display-name lang="it">Rai 1</display-name>
    <icon src="http://d57e32cb.static.ziggozakelijk.nl/%3Ca%20href%3D"http://www.webgrabplus.com/logos/Rai1.it.png">http://www.webgrabplus.com/logos/Rai1.it.png" />
  </channel>
  <channel id="Rai 1 HD +1">
    <display-name lang="it">Rai 1 HD +1</display-name>
    <icon src="http://d57e32cb.static.ziggozakelijk.nl/%3Ca%20href%3D"http://www.webgrabplus.com/logos/Rai1.it.png">http://www.webgrabplus.com/logos/Rai1.it.png" />
  </channel>
  <channel id="Rai 1 HD +2">
    <display-name lang="it">Rai 1 HD +2</display-name>
    <icon src="http://d57e32cb.static.ziggozakelijk.nl/%3Ca%20href%3D"http://www.webgrabplus.com/logos/Rai1.it.png">http://www.webgrabplus.com/logos/Rai1.it.png" />
  </channel>
</tv>

I run the script an I have this result:

<?xml version="1.0" encoding="UTF-8"?>
<tv generator-info-name="WebGrab+Plus/w MDB &amp; REX Postprocess -- version  V1.57 -- Jan van Straaten" generator-info-url="http://www.webgrabplus.com">
  <channel id="Rai 1">
    <display-name lang="it">Rai 1</display-name>
    <icon src="http://d57e32cb.static.ziggozakelijk.nl/%3Ca%20href%3D"http://www.webgrabplus.com/logos/Rai1.it.png">http://www.webgrabplus.com/logos/Rai1.it.png" />
    <url>http://www.merge-xmltv</url>
  </channel>
  <channel id="Rai 1 HD +1">
    <display-name lang="it">Rai 1 HD +1</display-name>
    <url>http://www.merge-xmltv</url>
  </channel>
  <channel id="Rai 1 HD +2">
    <display-name lang="it">Rai 1 HD +2</display-name>
    <url>http://www.merge-xmltv</url>
  </channel>

Look like skip the channels made with the command:

same_as="Rai 1"

I am confuse, probably I did something wrong.

Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years

Here there is everything. :)

Attachments: 
Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years

Ok, I understand the question... I was really wrong he he. I did what you told, I made a new config file with all channels like:

    <channel update="i" site="merge-xmltv_2" site_id="Rai1.it" xmltv_id="Rai 1">Rai 1</channel>
    <channel update="i" site="merge-xmltv_2" site_id="Rai1.it" xmltv_id="Rai 1 HD +1">Rai 1 HD +1</channel>
    <channel update="i" site="merge-xmltv_2" site_id="Rai1.it" xmltv_id="Rai 1 HD +2">Rai 1 HD +2</channel>
    <channel update="i" site="merge-xmltv_2" site_id="Rai2.it" xmltv_id="Rai 2">Rai 2</channel>
    <channel update="i" site="merge-xmltv_2" site_id="Rai2.it" xmltv_id="Rai 2 HD +1">Rai 2 HD +1</channel>
    <channel update="i" site="merge-xmltv_2" site_id="Rai2.it" xmltv_id="Rai 2 HD +2">Rai 2 HD +2</channel>
    <channel update="i" site="merge-xmltv_2" site_id="Rai3.it" xmltv_id="Rai 3">Rai 3</channel>
    <channel update="i" site="merge-xmltv_2" site_id="Rai3.it" xmltv_id="Rai 3 HD +1">Rai 3 HD +1</channel>
    <channel update="i" site="merge-xmltv_2" site_id="Rai3.it" xmltv_id="Rai 3 HD +2">Rai 3 HD +2</channel>
    <channel update="i" site="merge-xmltv_2" site_id="Rete4.it" xmltv_id="Rete 4">Rete 4</channel>
    <channel update="i" site="merge-xmltv_2" site_id="Rete4.it" xmltv_id="Rete 4 HD +1">Rete 4 HD +1</channel>
    <channel update="i" site="merge-xmltv_2" site_id="Canale5.it" xmltv_id="Canale 5">Canale 5</channel>
    <channel update="i" site="merge-xmltv_2" site_id="Canale5.it" xmltv_id="Canale 5 HD +1">Canale 5 HD +1</channel>

And I made a new file merge-xmltv renamed in merge-xmltv_2 where I configured two target. First the new file guide.xml the second, the logos to join loghi.xml.

Still there is something wrong (probably I did something wrong), all channels have the first logo I setup, the logo of Rai 1. Also I setup the logos only about the channels I wrote before. But also the channel La7 have the logo of the channel Rai 1, also if I didn't specify any logo.

I attach the result.

Excuseme about my english...

Attachments: 
Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years

Excuseme if I disturb you again but I really can't understand the problem. I try to upload the configuration I made.

1) WebGrab++.config.xml - The config file I used to grab the data first time from rytec
2) merge-xmltv.ini - The ini file grab the data first time from rytec
3) rytecxmltvSkyIT.xml - The rytec EPG
4) guide.xml - The result of the first grab

Till here everything look like ok

5) WebGrab++.config_01.xml - The config file I used to grab the data second time from guide.xml
6) merge-xmltv_01.ini - The ini file grab the data second time from guide.xml and logos.xml
7) logos.xml - The list of logos ready to join
8) guide_01.xml - The result of the second grab

Inside the second grab the link are still all the same, I can't find the error. I hope you can again help me :D :D

https://www.dropbox.com/s/w4tm4w87di43r1u/Blackbear199.zip?dl=0

Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years

Really thank you about your help :)

If I can offer you one beer tell me :) :) :)

Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years

Hello, using the new ini I have some problems. Generally I can't choose correctly the right gmt, I chose Rome and my epg was late one hour, so I changed to Helsinki andy epg still was late one hour. So just for try I chose London but nothing happen. This is not a really bad problem I can change the gmt from the setup of the program like Kodi, the real big problem is if I update the epg around midnight all programs start to be late 24 hours. Like, if one program need be Friday, in my epg I will have it Saturday. I have no idea why, happen if I grab around midnight, now I setup to grab at 00.25
Thank you if someone can help me.

Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years

Because Italian website reject request from Indonesian IP. This is my main problem :( :( If I can, I do it so happy.

Generally I cant't also open the mediaset website, they directly show me one message like "from your country you can't browse this website" :( :(

Blackbear199 wrote:

you do know rytec xml files are created by willy(doglover) and he uses webgrab to generate them?

so why dont you try the sky.it.ini and see what happens.

 

Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years

Really thank you to understand me and always help :D

Blackbear199 wrote:

try this then.it will adjust all times to UTC when they are merged.

the time offset slider in iptv simple client should be set to your time offset from UTC.

so malaysia is UTC +0800 i think so set it to +8 hrs.

 

 

 

Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years

With the new ini I can fix the utc zone, but the grab still be one day late. Always show me the programs one day after, after the first grab. I really can't understand the reason :(

Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years

Yes you understand clearly :( If I have one source like :

  <programme start="20170214150000 +0200" stop="20170214152000 +0200" channel="La7.it">
    <title lang="it">Tg La7 Cronache</title>
    <sub-title lang="it">[informazione. news]</sub-title>
    <desc lang="it">Ep. 45. Programma dedicato alle notizie di cronaca a cura della redazione News di La7</desc>
  </programme>

After the first grab, before merge the logos I have the epg like:

  <programme start="20170215150000 +0200" stop="20170214152000 +0200" channel="La7.it">
    <title lang="it">Tg La7 Cronache</title>
    <sub-title lang="it">[informazione. news]</sub-title>
    <desc lang="it">Ep. 45. Programma dedicato alle notizie di cronaca a cura della redazione News di La7</desc>
  </programme>

But this happen only if I grab the data around midnight. I tried to setup the grab at 00:01 or 00:30 or 00:45 and this trouble happen. If I setup to grab at 05:00 AM the grab is perfect. To grab I am using one windows machine with the timing GMT:Europe/Rome also if I am in Indonesia. I really have no idea about this trouble :( :(

Tapiocapioca
Offline
Has donated long time ago
Joined: 8 years
Last seen: 5 years

With merge-xmltv-utc.ini is ok, the days still be the same, happen only with the other one merge-xmltv.ini file. Actually I am using merge-xmltv-utc.ini also about the first scan. :D

cvxcvx
Offline
Donator
Joined: 8 years
Last seen: 3 weeks

Hi. Please help.

 

Al time generete me this same link to icon

 

<?xml version="1.0" encoding="UTF-8"?>
<tv generator-info-name="WebGrab+Plus/w MDB &amp; REX Postprocess -- version  V2.1 -- Jan van Straaten" generator-info-url="http://www.webgrabplus.com">
  <channel id="Animal Planet HD">
    <display-name lang="it">Animal Planet HD</display-name>
    <icon src="http://d57e32cb.static.ziggozakelijk.nl/%3Ca%20href%3D"http://webgrab.com/Animal%20Planet%20HD.png">http://webgrab.com/Animal%20Planet%20HD.png" />
    <url>http://www.merge-xmltv</url>
  </channel>
  <channel id="ATM Rozrywka">
    <display-name lang="it">ATM Rozrywka</display-name>
    <icon src="http://d57e32cb.static.ziggozakelijk.nl/%3Ca%20href%3D"http://webgrab.com/Animal%20Planet%20HD.png">http://webgrab.com/Animal%20Planet%20HD.png" />
    <url>http://www.merge-xmltv</url>
  </channel>
  <channel id="AXN">
    <display-name lang="it">AXN</display-name>
    <icon src="http://d57e32cb.static.ziggozakelijk.nl/%3Ca%20href%3D"http://webgrab.com/Animal%20Planet%20HD.png">http://webgrab.com/Animal%20Planet%20HD.png" />
    <url>http://www.merge-xmltv</url>
  </channel>

 

Me ini file:

**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: merge-xmltv
* @MinSWversion: 1.1.1/56.02
* @Revision 2 - [21/10/2015] Francis De Paemeleere
*   - speedup for large files
* @Revision 1 - [17/10/2015] Jan van Straaten
*   -  allows multiple xmltv input file to merge
* @Revision 0 - [09/05/2014] Jan van Straaten
*   - creation
* @Remarks:
* @header_end
**------------------------------------------------------------------------------------------------
*** edit - timezone=UTC+00:00 - to the timezone for which the xmltv data is created
*** edit (optional) - cultureinfo=en-GB - to the cultureinfo of the country for which the xmltv data is created
* site {url=merge-xmltv|timezone=UTC+00:00|maxdays=31.1|cultureinfo=en-GB|charset=UTF-8|titlematchfactor=90|keepindexpage}
site {url=merge-xmltv|timezone=Europe/Rome|maxdays=7|cultureinfo=it-IT|charset=UTF-8|titlematchfactor=90|keepindexpage}
*
*** set episodesystem preference,onscreen or xmltv_ns
site {ratingsystem=IT|episodesystem=onscreen}
*
*** edit - path_of_the_xmltv_file2merge.xml - to your requirements
*** more than one file2merge or just one:
*subpage.format {list|path_of_the_1st_xmltv_file2merge.xml|path_of_the_2nd_xmltv_file2merge.xml|etc}
*** example
*subpage.format {list|D:\guide-1.xml|D:\guide-2.xml}
subpage.format {list|J:\Webgrab\Web11\loghi.xml|J:\Webgrab\Web11\1.xml}
url_index{url|file://|subpage|}
*
scope.range {(datelogo)|end}
index_variable_element.modify {addstart|'config_site_id'}
end_scope
index_urlchannellogo.scrub {single(includeblock="id="'index_variable_element'")|<channel|<icon src="http://d57e32cb.static.ziggozakelijk.nl/%7C" />|</channel>}
*
index_start.scrub {single|start="||"|>}
index_stop.scrub {single|stop="||"|>}
index_title.scrub {single|<title|>|</title>|</title>}
index_subtitle.scrub {single|<sub-title|>|</sub-title>|</sub-title>}
index_description.scrub {single|<desc|>|</desc>|</desc>}
index_actor.scrub {multi|<actor>||</actor>|</actor>}
index_director.scrub {multi|<director>||</director>|</director>}
index_writer.scrub {multi|<writer>||</writer>|</writer>}
index_producer.scrub {multi|<producer>||</producer>|</producer>}
index_presenter.scrub {multi|<presenter>||</presenter>|</presenter>}
index_productiondate.scrub {single|<year>||</year>|</year>}
index_category.scrub {multi|<category|>|</category>|</category>}
index_rating.scrub {multi|<rating|<value>|</value>|</rating>}
index_starrating.scrub {single|<star-rating>|<value>|</value>|</star-rating>}
index_episode.scrub {single(pattern="S'S1'/'St1' E'E1'/'Et1' P'P1'/'Pt1'""'S0'/'St1'.'E0'/'Et1'.'P0'/'Pt1'")|<episode-num|>|<|/episode-num>}
index_showicon.scrub {single|<programme|<icon src="http://d57e32cb.static.ziggozakelijk.nl/%7C" />|</programme>}
*
index_title.modify {cleanup(style=htmldecodespecialchar)}
index_subtitle.modify {cleanup(style=htmldecodespecialchar)}
index_description.modify {cleanup(style=htmldecodespecialchar)}
index_actor.modify {cleanup(style=htmldecodespecialchar)}
index_director.modify {cleanup(style=htmldecodespecialchar)}
index_writer.modify {cleanup(style=htmldecodespecialchar)}
index_producer.modify {cleanup(style=htmldecodespecialchar)}
index_presenter.modify {cleanup(style=htmldecodespecialchar)}
index_category.modify {cleanup(style=htmldecodespecialchar)}
*
*operations
scope.range {(indexshowdetails)|end}
* extraxt times
*start="20120922004200" stop="20120922021200"
index_start.modify {substring(type=char)|8 4}
index_temp_1.modify {substring(type=char)|'index_start' 0 2} * the hours
index_start.modify {substring(type=char)|2 2} * the minutes
index_start.modify {addstart|'index_temp_1':}
index_stop.modify {substring(type=char)|8 4}
index_temp_1.modify {substring(type=char)|'index_stop' 0 2} * the hours
index_stop.modify {substring(type=char)|2 2} * the minutes
index_stop.modify {addstart|'index_temp_1':}
*
index_description.modify {cleanup}
end_scope

**  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _
**      #####  CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
** @auto_xml_channel_start
*index_site_id.scrub {regex||<channel [^>]*id="[^\"]*"[^>]*>.*?</channel>||}
*scope.range {(channellist)|end}
*index_site_channel.modify {addstart|'index_site_id'}
*index_site_id.modify {substring(type=regex)|<channel [^>]*id="([^\"]*)"[^>]*>}
*index_site_id.modify {cleanup(style=htmldecodespecialchar)}
*index_site_channel.modify {substring(type=regex)|<display-name [^>]*>(.*?)</display-name>}
*index_site_channel.modify {cleanup(style=htmldecodespecialchar)}
*index_site_id.modify {cleanup(removeduplicates=equal link="index_site_channel")}
*end_scope
** @auto_xml_channel_end

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl