You are here

(Solved) Merge xmltv with EPG URL

30 posts / 0 new
Last post
victorypoint
Offline
Joined: 7 years
Last seen: 2 years
(Solved) Merge xmltv with EPG URL

I have a question regarding the merging of xmltv files using this guide @ http://www.webgrabplus.com/sites/default/files/download/ini/info/zip/Misc_merge-xmltv.zip. The merge-xmltv.ini is designed to merge 2 or more local xmltv files. However, can it be used to merge an xmltv file with an epg url? I tried this list in the ini but it spit out an error and didn't like the URL:

subpage.format subpage.format {list|C:\test\my-epg.xml|http://some-epg-link.xml}

Note that I used actual working local and url xml files in the above example but still got an error about the url.

Any help with this issue is greatly appreciated.

-Al

victorypoint
Offline
Joined: 7 years
Last seen: 2 years

Thank-you Blackbear! That solution works great. Much appreciated!

-Al

Lovefall
Offline
Joined: 11 years
Last seen: 5 years

Hi, 

I´m struggling with this now and can´t get it to work... I have one local xml-file and I have an url with xml that I want to combine. 

I have tried this: 

subpage.format {list|/share/CACHEDEV1_DATA/.qpkg/xmltv/conf/tv_grab_file.xml|http://ace-tv.xyz:25461/xmltv.php?username=xxxxxx&password=xxxxxxxx

url_index{url||subpage|}

Result: 

Unhandled Exception

Index was outside the bounds of the array.

  at WGconsole.Program.ConsoleApplication (System.String[] args) [0x01cfa] in <274ad6f9740e441a95b86a1d1148edca>:0

  at WGconsole.Program.Main (System.String[] args) [0x00016] in <274ad6f9740e441a95b86a1d1148edca>:0

 

Then I try this:

subpage.format {list|/file://share/CACHEDEV1_DATA/.qpkg/xmltv/conf/tv_grab_file.xmltv|http://ace-tv.xyz:xxxxx/xmltv.php?username=xxxxxx&password=xxxxxxxx}  

url_index{url||subpage|}

I got this result

file file://share/CACHEDEV1_DATA/.qpkg/xmltv/conf/tv_grab_file.xmltv doesn't exist

I´m getting crazy soon... Please help!

/Niklas

Lovefall
Offline
Joined: 11 years
Last seen: 5 years

I have tried that to, then the result is: 

update requested for - 1 - out of - 1 - channels for 16 day(s)

(   1/1   ) MERGE-XMLTV -- chan. (xmltv_id=dummy) -- mode Force

i

file file://http://ace-tv.xyz:25461/xmltv.php?username=xxxxxxxxxx&password=xxxxxxxxxx doesn't exist

Lovefall
Offline
Joined: 11 years
Last seen: 5 years

Ok, thx.

This downloaded xml-files looks a little bit different from my Webgrab files, there is no spaces between ></channel><channel id=

Should webgrab be able to read the information in this file for combining: 

<?xml version="1.0" encoding="utf-8" ?><!DOCTYPE tv SYSTEM "xmltv.dtd"><tv generator-info-name="IPTV" generator-info-url="http://ace-tv.xyz:25461/"><channel id="CAPITAL TV"><display-name>UK: CAPITAL TV</display-name><icon src="http://www.webgrabplus.com/%3Ca%20href%3D"http://www.tv-logo.com/pt-data/uploads/images/logo/capital_tv_uk.jpg">http://www.tv-logo.com/pt-data/uploads/images/logo/capital_tv_uk.jpg" /></channel><channel id="Heart TV"><display-name>UK: HEART TV</display-name><icon src="http://www.webgrabplus.com/%3Ca%20href%3D"http://www.tv-logo.com/pt-data/uploads/images/logo/heart_tv_uk.jpg">http://www.tv-logo.com/pt-data/uploads/images/logo/heart_tv_uk.jpg" /></channel><channel id="Sky Action"><display-name>UK: SKY CINEMA ACTION &amp; ADVENTURE</display-name><icon src="http://www.webgrabplus.com/%3Ca%20href%3D"http://www.tv-logo.com/pt-data/uploads/images/logo/sky_uk_movies_action_adventure.jpg">http://www.tv-logo.com/pt-data/uploads/images/logo/sky_uk_movies_action_..." /></channel><channel id="Sky Action"><display-name>UK: SKY CINEMA ACTION &amp; ADVENTURE HD</display-name><icon src="http://www.webgrabplus.com/%3Ca%20href%3D"http://www.tv-logo.com/pt-data/uploads/images/logo/sky_uk_movies_action_adventure_hd.jpg">http://www.tv-logo.com/pt-data/uploads/images/logo/sky_uk_movies_action_..." /></channel><channel id="Sky Comedy"><display-name>UK: SKY CINEMA COMEDY</display-name><icon src="http://www.webgrabplus.com/%3Ca%20href%3D"http://www.tv-logo.com/pt-data/uploads/images/logo/sky_uk_movies_comedy.jpg">http://www.tv-logo.com/pt-data/uploads/images/logo/sky_uk_movies_comedy.jpg" /></channel><channel id="Sky Comedy"><display-name>UK: SKY CINEMA COMEDY HD</display-name><icon src="http://www.webgrabplus.com/%3Ca%20href%3D"http://www.tv-logo.com/pt-data/uploads/images/logo/sky_uk_movies_comedy_hd.jpg">http://www.tv-logo.com/pt-data/uploads/images/logo/sky_uk_movies_comedy_..." /></channel>

 

</programme><programme start="20171013140000 +0100" stop="20171013150000 +0100" channel="CBS Action" ><title>NCIS: Los Angeles</title><desc>Part two of two. Hetty and the NCIS team continue trying to find the elusive black book, but face competition from foreign security agencies keen to discover the secrets it contains - and Kensi is kidnapped as the search narrows(n)</desc></programme><programme start="20171013140000 +0100" stop="20171013150000 +0100" channel="CBS Drama" ><title>Medium</title><desc>Allison dreams about a husband and wife who die in suspicious circumstances and discovers that her vision may be useful to one of Devalos&apos;s colleagues. However, she finds he is not very receptive to her methods. Patricia Arquette stars(n)</desc></programme><programme start="20171013140000 +0100" stop="20171013143000 +0100" channel="Sky Arts" ><title>Auction</title><desc>Raphael&apos;s Head of a Young Apostle breaks records at an auction at Sotheby&apos;s. A desk believed to have been made for Madame de Pompadour also goes under the hammer in London(n)</desc></programme>

/Niklas

Edit: I see now that icons is from webgrabplus.com! :) 

cvxcvx
Offline
Donator
Joined: 8 years
Last seen: 2 months

Hi. Am have problem from this atrybut

merge-xmltv not grabe this

  <date>2016</ate>
   <country>USA</country>
    <episode-num system="xmltv_ns">s.2, e.21</episode-num>

bam
Offline
Joined: 4 years
Last seen: 4 years

Hello, I'm new here and for some reason I don't see any answers with the solution.
Could you please re-post it again?

Also, I wonder if merging two EPG URLs possible?
PS:
Well, actually I have XMLTV URL and "normal" EPG URL which need parsing and merging against with.

mat8861
Offline
WG++ Team memberDonator
Joined: 8 years
Last seen: 3 hours

Did you start with webgrabplus-siteinipack\siteini.pack\Misc\merge-xmltv.ini ?

bam
Offline
Joined: 4 years
Last seen: 4 years

Yes I did but merge-xmltv.ini has only local xml merge out of box so I wonder how could I achieve remote merging also without saving local files first.

mosli
Offline
Donator
Joined: 3 years
Last seen: 3 months

If someone else is still looking for a way to merge multiple epg xmls, I would like to recommend you the tool you can download at http://xmltv.org. It works with a very simple bash command:

xmltv tv_cat epg1.xml epg2.xml > myepg.xml

StralEPG
Offline
Donator
Joined: 3 years
Last seen: 5 months
mosli wrote:

If someone else is still looking for a way to merge multiple epg xmls, I would like to recommend you the tool you can download at http://xmltv.org. It works with a very simple bash command:
xmltv tv_cat epg1.xml epg2.xml > myepg.xml

Can you help me little further regarding merging two EPG files? (EPG.xml & EPG_2.xml)

How exactly I have to make this bash command with XMLTV? I downloaded XMLTV from http://xmltv.org version 1.0.0 but I have no idea what to do next.

I also tried to configure WebGrab's own EPG Merge tool but can't manage to configure it either. I have to merge two EPG.xml files in order to get 1 EPG file I will host since most IPTV players do not support multiple EPG sources.

Thanks in advance for help! I need this pretty urgently.

hugocarmo
Offline
Donator
Joined: 4 years
Last seen: 5 hours

Good morning.
I´m struggling to merge my webgrabplus resulting xml with a external xml from url.
I tried all the options described on the help files but it doesn´t work.
I only wanted to after my xml grabbed through webrab+plus app finished to merge with an external xml url.
Can someone help me please?

Thank You.
I attach my merge-xmltv.ini file.

Attachments: 
Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 9 hours

you cant grab epg data from a site and merge another xml file at the same time.
you have grab the epg data first then setup another instance of webgrab to merge that epg.xml with your other source.

it can be done but there's a few steps involved and depending on your epg.xml data the stock merge-xmltv.ini most likelt cannot be used.

one big issue with it is that all epg must have the same time offset as it only has one setting for the generated combined xml file and assume all epg input data uses this same time offset.

another issue is if your using multi language epg data,again the stock merge ini sets the language attributes to whatever you set it to and ignores what the input xml files have.

then there's episode pattern information(onscreen or xmltv_ns),again its ignored and outpust whatever the merge ini is set to.

and any other thing that can go wrong..

a custom merge ini can be created to deal with all these problems.

back when the merge ini was created it was intended for the users grabbing local epg,then iptv took off and things are not the same anymore.

i would do some searching and reading,there is software/other methods to merge xml data,i dont know the name or links off the top of my head but its worth looking into.

hugocarmo
Offline
Donator
Joined: 4 years
Last seen: 5 hours

Thank You Blackbear199.
So the way I´m asking is impossible to do with webgrab+plus?
I tried to use other software but windows versions are outdated and none of them worked.
If I download the xml from the external link I want to merge with my webgrab+plus xml can it be locally merged with webgrab+plus?
The time offset and languages are the same.

Thank you.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 9 hours

what are you using to view your epg data with.
most players support multiple epg xml files import,have you checked if you can simply do this?

hugocarmo
Offline
Donator
Joined: 4 years
Last seen: 5 hours

I´m using several players, I made my own m3u from a xcode, and personalised my channel lists with logos and created epg for all channels that I have, I use mostly Tivimate, I know that I can add more than a source for epg.
The reason was to keep it simple, all in one file, this because I have more family members using my list and they already have all things configured to use my epg source, I manage the channel list, wich from time to time I add more channels, they dont know how to add more sources and they live faraway from me, if I manage to merge the two in one file was problem solved.

But anyway thank you form your help Blackbear199.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 9 hours

check out xTeVe
https://github.com/xteve-project/xTeVe

it can do everything you want and more...

hugocarmo
Offline
Donator
Joined: 4 years
Last seen: 5 hours

Thank You.

I´ll give it a try!

mat8861
Offline
WG++ Team memberDonator
Joined: 8 years
Last seen: 3 hours
jhoonycxs
Offline
Donator
Joined: 3 years
Last seen: 10 months

Would you help me? I couldn't use it on windows 11

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 9 hours

thats not much of a description of the problem.
works fine for me on win 11.

jhoonycxs
Offline
Donator
Joined: 3 years
Last seen: 10 months
Blackbear199 wrote:

thats not much of a description of the problem.
works fine for me on win 11.

ok, let's go, I'll change the parameters in the file WebGrab+Plus\siteini.pack\Misc\merge-xmltv

subpage.format {list|C:\xmltv\epg.xml|C:\xmltv\epg1.xml|C:\xmltv\epg2.xml}

@auto_xml_channel_start
index_site_id.scrub {regex||]*id="[^\"]*"[^>]*>.*?||}
scope.range {(channellist)|end}
index_site_channel.modify {addstart|'index_site_id'}
index_site_id.modify {substring(type=regex)|]*id="([^\"]*)"[^>]*>}
index_site_channel.modify {substring(type=regex)|]*>(.*?)}
index_site_id.modify {cleanup(removeduplicates=equal link="index_site_channel")}
end_scope
@auto_xml_channel_end

in the file WebGrab++.config

add these lines in WebGrab++.config

dummy

and generated the file merge-xmltv.channels

I went back in the file WebGrab+Plus\siteini.pack\Misc\merge-xmltv

and added the *

*@auto_xml_channel_start
*index_site_id.scrub {regex||]*id="[^\"]*"[^>]*>.*?||}
*scope.range {(channellist)|end}
*index_site_channel.modify {addstart|'index_site_id'}
*index_site_id.modify {substring(type=regex)|]*id="([^\"]*)"[^>]*>}
*index_site_channel.modify {substring(type=regex)|]*>(.*?)}
*index_site_id.modify {cleanup(removeduplicates=equal link="index_site_channel")}
*end_scope
* @auto_xml_channel_end

now when I run the RUN in wg I have this log and it does not merge my epgs

[ ]
[ ] WebGrab+Plus/w MDB & REX Postprocess -- version V3.3.0.0
[ ]
[ ] Jan van Straaten
[ ] Francis De Paemeleere
[ ]
[ ] thanks to Paul Weterings, Mat8861, Blackbear199 and all the contributing users
[ ] --------------------------------------------------------------------------------
[ ]
[ ] Job started at 23/04/2023 11:28:22
[ Debug ]
[ Debug ] Running on: Microsoft Windows NT 6.2.9200.0
[ Debug ] Environment: 4.0.30319.42000
[ Debug ]
[ Debug ] Loading timezone data
[ Debug ] Embedded timezones source: timezone.timezonesdata.txt
[ Debug ] Reading config file: C:\Users\jhoon\AppData\Local\WebGrab+Plus\WebGrab++.config.xml
[ Info ] Checking License ..
[ Info ] For License request/update data, see WGLicense.log.txt
[Warning ] timezone=UTC+00:00 mapped with timezone_id "Atlantic/Canary"
[ Debug ]
[ Info ] found: C:\Users\jhoon\AppData\Local\WebGrab+Plus\siteini.pack\Misc\merge-xmltv.ini -- Revision 04
[ Debug ] xmltv input file - C:\Users\jhoon\AppData\Local\WebGrab+Plus\epgtest.xml - found
[ Debug ] 0 superfluous shows removed
[ Info ] Found existing channel (xmltv_id=dummy) in the config file
[ Info ]
[ Info ]
[ Info ] i=index .=same c=change g=gab r=replace n=new
[ Info ]
[ Info ]
[ Info ] Group (0) :
[ Info ] update requested for - 1 - out of - 1 - channels for 6 day(s)
[ Debug ]
[ Info ] ( 1/1 ) MERGE-XMLTV -- chan. (xmltv_id=dummy) -- mode Force
[ Info ] ExceptionO executável especificado não é um aplicativo válido para esta plataforma de SO.
[ Info ] ExceptionO executável especificado não é um aplicativo válido para esta plataforma de SO.
[ Info ] ExceptionO executável especificado não é um aplicativo válido para esta plataforma de SO.
[Error ] no shows in indexpage!
[ Info ]
[ Info ] Summary for update of dummy
[ Info ] no changes, no update necessary !
[ Info ] unchanged shows inspected 0
[ Info ] total after update 0

[ Debug ]
[ Debug ] 0 shows in 1 channels
[ Debug ] 0 updated shows
[ Debug ] 0 new shows added
[ Info ]
[ Info ]
[ ] Job finished at 23/04/2023 11:28:23 done in 0s

Attachments: 
Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 9 hours

what i showed you above is a different program than what your using.
your trying to use the merge-xmltv.ini which uses webgrab
what i showed is a separate windows executeable that does this.
you can do it with webgrab as your trying but its alot slower.
upload your merge-xmltv.ini
you have a error in it somewhere.

jhoonycxs
Offline
Donator
Joined: 3 years
Last seen: 10 months
Blackbear199 wrote:

what i showed you above is a different program than what your using.
your trying to use the merge-xmltv.ini which uses webgrab
what i showed is a separate windows executeable that does this.
you can do it with webgrab as your trying but its alot slower.
upload your merge-xmltv.ini
you have a error in it somewhere.

the program you use would be the xmltv?
if so I downloaded and created a folder in C:\xmltv , and ran it , after that it created other files , but now when running it opens and closes without logs I do not know what I am doing wrong

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 9 hours

you need to decide which way you want to do it.
read what i said above about issues using merge-xmltv.ini
the big one is all your epg must be using the same time offset,if different channels use different offsets then yo will end up with a huge mess that will be wrong.
anyway this..
url_index{url||subpage|}
should be
url_index{url|file://|subpage|}

to use the merge-xmltv.exe as i showed above,download merge-xmltv.exe.gz,extract it(install 7zip on windows)
copy the merge-xmltv.exe to C:\xmltv

open terminal
cd C:\xmltv
merge-xmltv.exe -t KEEP -o C:\xmltv\merged.xml C:\xmltv\epg.xml C:\xmltv\epg1.xml C:\xmltv\epg2.xml

jhoonycxs
Offline
Donator
Joined: 3 years
Last seen: 10 months
Blackbear199 wrote:

you need to decide which way you want to do it.
read what i said above about issues using merge-xmltv.ini
the big one is all your epg must be using the same time offset,if different channels use different offsets then yo will end up with a huge mess that will be wrong.
anyway this..
url_index{url||subpage|}
should be
url_index{url|file://|subpage|}
to use the merge-xmltv.exe as i showed above,download merge-xmltv.exe.gz,extract it(install 7zip on windows)
copy the merge-xmltv.exe to C:\xmltv
open terminal
cd C:\xmltv
merge-xmltv.exe -t KEEP -o C:\xmltv\merged.xml C:\xmltv\epg.xml C:\xmltv\epg1.xml C:\xmltv\epg2.xml

what am I doing wrong? I even installed Strawberry Perl

Attachments: 
Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 9 hours

whats in C:\xmltv
i have no idea what your doing,the exe is a dotnet standalone program which has everything included for it to run.
no idea where the perl stuff your gettin is comming from.
here is is in zip format,extract it to C:\xmltv and try again.
edit : link removed

jhoonycxs
Offline
Donator
Joined: 3 years
Last seen: 10 months
Blackbear199 wrote:

whats in C:\xmltv
i have no idea what your doing,the exe is a dotnet standalone program which has everything included for it to run.
no idea where the perl stuff your gettin is comming from.
here is is in zip format,extract it to C:\xmltv and try again.
Edit : link removed

on the xmltv page there are instructions to install perl
https://wiki.xmltv.org/index.php/XMLTVWindowsBuild

I ran an exe that you sent and got the error below attached image

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell to get new features and improvements! https://aka.ms/PSWindows

PS C:\xmltv> merge-xmltv.exe -t KEEP -o C:\xmltv\merged.xml C:\xmltv\epg.xml C:\xmltv\epg1.xml C:\xmltv\epg2.xml
merge-xmltv.exe : The term 'merge-xmltv.exe' is not recognized as a cmdlet, function, script file, or
operable program. Check the spelling of the name or, if a path was included, verify that the path is correct and
try again.
On line:1 character:1
+ merge-xmltv.exe -t KEEP -o C:\xmltv\merged.xml C:\xmltv\epg.xml C:\xm ...
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (merge-xmltv.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Suggestion [3,General]: The merge-xmltv.exe command is not found, but exists in the current location. By default, Windows PowerShell does not load commands from the current location. If you trust this command, type: ".\merge-xmltv.exe". See "get-help about_Command_Precedence" for more details.
PS C:\xmltv>

Attachments: 
Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 9 hours

use the command prompt not powershell
type cmd in search

jhoonycxs
Offline
Donator
Joined: 3 years
Last seen: 10 months
Blackbear199 wrote:

use the command prompt not powershell
type cmd in search

it worked with your xmltv file and using CMD , along with the command
merge-xmltv.exe -t KEEP -o C:\xmltv\merged.xml C:\xmltv\epg.xml C:\xmltv\epg1.xml C:\xmltv\epg2.xml

thank you very much and sorry for my lack of knowledge thank you very much for your help

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