cross-eit.py on MythTV 0.27/0.28

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
mythbuntubox
Senior
Posts: 153
Joined: Tue Apr 28, 2015 1:17 pm
Great Britain

cross-eit.py on MythTV 0.27/0.28

Post by mythbuntubox »

In the UK, the Radio Times schedule feed has recently been turned off. I had been using this feed with FreeGuide on my laptop. I have since been looking for free alternatives, and saw this script, which would potentially let me draw the info I need from the EIT info my Mythbuntu already obtains automatically:

https://www.mythtv.org/wiki/Cross-eit.py

I see that it only indicates support for 0.24 and mentions that there have been parsing changes along the way.

Does anyone know if one can get this working on MythTV 0.27 or 0.28, as I am indeed getting parsing errors when I try to use the script under 0.27?

If that is possible, what would be the best way to select all channels in the MythTV guide info for exporting to an XMLTV file, which FreeGuide could use?

Thanks in advance for any insights that people may be able to contribute.
User avatar
dizygotheca
Developer
Posts: 267
Joined: Wed Sep 03, 2014 9:02 am
Great Britain

Re: cross-eit.py on MythTV 0.27/0.28

Post by dizygotheca »

The wiki comments about parsing errors relate to mythfilldatabase. Does FreeGuide complain about the xml file ?

It seems a lot of trouble to go to. The FreeGuide troubleshooting FAQ suggests using one of the XMLTV alternatives. Do they not work ?
mythbuntubox
Senior
Posts: 153
Joined: Tue Apr 28, 2015 1:17 pm
Great Britain

Re: cross-eit.py on MythTV 0.27/0.28

Post by mythbuntubox »

Thanks for your reply.

Unfortunately, I encounter the parsing errors when trying to use the script to create an xmltv compatible file from the MythTV guide info, so no file has been produced so far that I can try with FreeGuide.

The author of FreeGuide basically indicates that the best grabbers to use in the UK now are uk_bleb, which is not great (e.g. no ITV channel info at all) but free, or the non-free Schedules Direct option:

https://sourceforge.net/p/freeguide-tv/ ... /35184156/

However, you can directly import xmltv-compatible files, which gave me the idea of trying the cross-eit script to create one of these files to try out.

Maybe it's just a mythconverg access problem or something that is giving me trouble with this.

I have also tried the uk_tvguide grabber, but that literally runs for hours and eventually crashes with an "out of memory" error on my laptop, so does not seem a very good alternative either.

Maybe you are right that it is a lot of hassle to go through, and I may have to settle for checking UK listings via Mythweb when I have Internet access while out, but maybe there is still hope for an offline option somehow... :-(
User avatar
dekarl
Developer
Posts: 228
Joined: Thu Feb 06, 2014 11:01 pm
Germany

Re: cross-eit.py on MythTV 0.27/0.28

Post by dekarl »

mythbuntubox wrote:the best grabbers to use in the UK now are uk_bleb, which is not great (e.g. no ITV channel info at all) but free
Is anybody working with BDS / ITV to clarify which part of the programme guide is actualy subject to the license fee and which is not?
the legalese, Bleb blog from 10 years ago with dead links,

We had the same issues in Germany around the same time and it was resolved in such a way, that basic information like start time, title, episode title of the show is not subject to a paid license in itself. So the license fee applies only to the enhanced data like description, photos, videos etc. The german broadcasters who do collect fees for EPG data provide special feeds for usages where the payment of a EPG data license fee is not possible or wanted. By mixing that free of charge data with cast and synopsis from wikipedia/themoviedb/thetvdb there is still a nice guide available.
mythbuntubox
Senior
Posts: 153
Joined: Tue Apr 28, 2015 1:17 pm
Great Britain

Re: cross-eit.py on MythTV 0.27/0.28

Post by mythbuntubox »

Let's hope so, dekarl. One would think that TV broadcasters had an interest in getting people to watch their channels by allowing free access to the EPG data, especially ITV, which profits more from the ads shown and does not get a slice of the licence fee. Oh, well. Who knows what the thinking behind this is.
User avatar
dizygotheca
Developer
Posts: 267
Joined: Wed Sep 03, 2014 9:02 am
Great Britain

Re: cross-eit.py on MythTV 0.27/0.28

Post by dizygotheca »

mythbuntubox,
I did PM you (assuming that you would be notified. Incorrectly it seems)
mythbuntubox
Senior
Posts: 153
Joined: Tue Apr 28, 2015 1:17 pm
Great Britain

Re: cross-eit.py on MythTV 0.27/0.28

Post by mythbuntubox »

Thank you very much for the PM, dizygotheca. Only saw it now. Will give it a go.
woidm
Newcomer
Posts: 4
Joined: Fri Mar 17, 2017 3:00 am
United States of America

Re: cross-eit.py on MythTV 0.27/0.28

Post by woidm »

I hate to dig up this older thread but I too am having issues with channel parsing errors and was hoping someone ( mythbuntubox? or dizygotheca?) might have any insights. Much like what mythbuntubox noted I'm not sure if this is a mythconverg access issue, a compatibility issue with 0.27, or something else. I was hoping someone has had better luck in the past year with getting this to work successfully.

Thank you very much for any help or information.
User avatar
dizygotheca
Developer
Posts: 267
Joined: Wed Sep 03, 2014 9:02 am
Great Britain

Re: cross-eit.py on MythTV 0.27/0.28

Post by dizygotheca »

I suggested a UK alternative so that the script wasn't needed.
Not sure I understand US EIT or the script's purpose.
But post the errors you're getting. It might be something simple...
woidm
Newcomer
Posts: 4
Joined: Fri Mar 17, 2017 3:00 am
United States of America

Re: cross-eit.py on MythTV 0.27/0.28

Post by woidm »

dizygotheca,

I was in the middle of writing up my issue when I believe I've stumbled across the root cause :idea: (other than it having been several hours and a late night when trying to fix the error). It appears to be a disconnect between how the wiki examples are written and how the script works. If mythbuntubox had been following the wiki examples then they likely had the same issue.

The wiki provides thefollowing example:
"./cross-eit.py 1004,tv2.guide 1108,history.guide 1022,natgeo.guide -o /tmp/export.xml"

However, the script is looking for the following format as noted in the script and elsewhere in the wiki:
"cross-eit.py OPTIONS chanid1,xmlid1 chanid2,xmlid2 chanidN,xmlidN"

I finally realized what the issue was when finally paying closer attention to the error wehn writting my response. The error was "Error: Not able to parse channel -o. Aborting...". Given the error print format in the script is "print "Error: Not able to parse channel %s. Aborting...\n" % (arg)" I finally realized that it was thinking "-o" was a channel number to parse rather than the output file option defined in the script. By rearranging my input command to the proper order I was able to parse the channel and output an XML file. Thank you for your response. :D

Now onto the fun part of trying to get the proper commands to have mythfilldatabase import the XML correctly. :geek:
User avatar
Steve Goodey
Moderator
Posts: 220
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Re: cross-eit.py on MythTV 0.27/0.28

Post by Steve Goodey »

woidm,

if the wiki entry turns out wrong any chance you could correct it? Bearing in mind that if you don't have a login you'll need to register and that option is turned off at the moment due to spamming. But we can get changed. Let us know.

Steve.
Don't forget the Wiki.
woidm
Newcomer
Posts: 4
Joined: Fri Mar 17, 2017 3:00 am
United States of America

Re: cross-eit.py on MythTV 0.27/0.28

Post by woidm »

Steve,

I do not currently have a login for editing the wiki but could support updating the wiki once registration is turned back on.

Something else to note that may be relevant for this thread and is certainly relevant for updating the wiki is an update for finding the channel numbers. Currently the wiki states:

mysql -u mythtv -p mythconverg -e \"SELECT chanid,callsign from channel WHERE callsign='channel name'\"

But I was unable to get that to work. The code after "-e" gave an error. Instead I recommend the following as an alternate (or wholesale replacement) which also outputs to a text file.

echo "select * from channel" | mysql -u [username] -p[password] mythconverg > ~/Desktop/channel.txt

There's also some additional cleanup that could be done to the code but it doesn't impact the functionality if anyone is reading this thread for assistance.
daraden
Senior
Posts: 175
Joined: Tue Feb 23, 2016 7:33 am
United States of America

Re: cross-eit.py on MythTV 0.27/0.28

Post by daraden »

mysql -u mythtv -p mythconverg -e \"SELECT chanid,callsign from channel WHERE callsign='channel name'\"
should be
mysql -u mythtv -p mythconverg -e "SELECT chanid,callsign from channel WHERE callsign='channel name'"
the \ is escaping the " in python (the wiki entry is likely a copy&paste error)
as for your recomendation

Code: Select all

 echo |mysql -u mythtv -p mythconverg -e "SELECT chanid,channum,callsign,name,xmltvid from channel" > ~/Desktop/channels.txt
may be a better option. It avoids the security risk of having your password in the command-line. it should contain all of the information required to identify the channels without extra data that is not needed.
woidm
Newcomer
Posts: 4
Joined: Fri Mar 17, 2017 3:00 am
United States of America

Re: cross-eit.py on MythTV 0.27/0.28

Post by woidm »

daraden,

Thanks for the code as that does make a nice neat output to work with. As a note, the inclusion of "sourceid" as an output may also be useful for those of us that have more than one tuner and duplicate channels on both tuners.
Post Reply