Zap2xml for ATSC in OpenELEC

  Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
edit4ever Offline
Senior Member
Posts: 171
Joined: Mar 2016
Reputation: 14
Post: #16
easy to follow video - thanks!

BTW - If you really want the best guide data, Schedules Direct is it and most would agree that it is worth the $25/yr. You can get the same type of internal grabber for Schedules Direct using Astrilchuk's sd2xmltv addon. Source code here:

https://github.com/astrilchuk/sd2xmltv

In case you can't build (don't have linux) - here's a link to the addon:

https://www.dropbox.com/s/kvqx4wst32lot3...1.zip?dl=0

I'm working with FastEddyCurrent to try to get additional program details into the zap2xml grabber - but the Schedules Direct data is very complete.


Current Kodi addon projects: zap2xml, sd4tvh and tvh2kodi (tvh config from inside Kodi)
Testing ATSC single and dual tuners on RPi3, KII Pro and M8S
find quote
clarkss12 Online
Senior Member
Posts: 287
Joined: Mar 2015
Reputation: 2
Post: #17
I have been using Schedules Direct for about 2 or 3 years for my guide data, and it is great. I will try your addon, thanks again.
find quote
edit4ever Offline
Senior Member
Posts: 171
Joined: Mar 2016
Reputation: 14
Post: #18
I've updated the zap2xml addon to include options for extra program details and icons. If this works for others I think it is about ready to add to the repo!

https://github.com/edit4ever/zap2xml

https://www.dropbox.com/s/x8ckjw5o5uxlmz...3.zip?dl=0


Thanks for any feedback!


Current Kodi addon projects: zap2xml, sd4tvh and tvh2kodi (tvh config from inside Kodi)
Testing ATSC single and dual tuners on RPi3, KII Pro and M8S
find quote
clarkss12 Online
Senior Member
Posts: 287
Joined: Mar 2015
Reputation: 2
Post: #19
I just noticed your new update for the Zap2xml, so I downloaded it from your github link. When I tried to install it on my OpenELEC box using install from zip, it gave me the error "Does not have the correct structure."

Your dropbox does not have that file anymore.

Thanks for your excellent work.
find quote
edit4ever Offline
Senior Member
Posts: 171
Joined: Mar 2016
Reputation: 14
Post: #20
Quote:I just noticed your new update for the Zap2xml, so I downloaded it from your github link. When I tried to install it on my OpenELEC box using install from zip, it gave me the error "Does not have the correct structure."

That's correct - it's not setup correctly in its current for to just be downloaded as a zip. I will be fixing that soon as it is leftover from bringing the code from two original sources together.

Quote:Your dropbox does not have that file anymore.

That's strange...I think the dropbox files expire after awhile. Let me give you a new link.

Unfortunately this forum does not allow file attachments...but you can follow updates here: https://forum.libreelec.tv/thread-440.html

I've also uploaded a new dropbox link here: https://www.dropbox.com/s/yoaitaapgwzs8g...1.zip?dl=0

Let me know if that works for you!

Also - I'm looking at changing the extended description option to allow the turning on/off of the different extra elements (like HD, CC, rating, etc) as well as an option to put them in the start or end of the description. If you like that idea let me know.

Thanks!


Current Kodi addon projects: zap2xml, sd4tvh and tvh2kodi (tvh config from inside Kodi)
Testing ATSC single and dual tuners on RPi3, KII Pro and M8S
find quote
clarkss12 Online
Senior Member
Posts: 287
Joined: Mar 2015
Reputation: 2
Post: #21
Your update from Dropbox would not install, wrong structure.
find quote
edit4ever Offline
Senior Member
Posts: 171
Joined: Mar 2016
Reputation: 14
Post: #22
(2016-06-26 05:39)clarkss12 Wrote:  Your update from Dropbox would not install, wrong structure.

strange - it updates/installs fine on my end. Have you tried restarting Kodi and then updating?


Current Kodi addon projects: zap2xml, sd4tvh and tvh2kodi (tvh config from inside Kodi)
Testing ATSC single and dual tuners on RPi3, KII Pro and M8S
find quote
clarkss12 Online
Senior Member
Posts: 287
Joined: Mar 2015
Reputation: 2
Post: #23
Re-downloaded it from your Dropbox, and it was half the size I downloaded yesterday. Anyway, it installed and I am going to set it up now. Thanks.
find quote
clarkss12 Online
Senior Member
Posts: 287
Joined: Mar 2015
Reputation: 2
Post: #24
I seem to have a problem, using your sd2xmltv module, it gathers the xml files as it should, however your zap2xml does not create the xml files. Here is the log, I am sure you can find what i am doing wrong.
thanks.

2016-06-26 11:41:59.213 /storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv: grab /storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv

2016-06-26 11:41:59.226 spawn: Executing "/storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv"

2016-06-26 11:47:24.617 /storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv: grab took 325 seconds

2016-06-26 11:47:25.643 /storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv: parse took 1 seconds

2016-06-26 11:47:25.643 /storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv: channels tot= 69 new= 0 mod= 0

2016-06-26 11:47:25.643 /storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv: brands tot= 0 new= 0 mod= 0

2016-06-26 11:47:25.643 /storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv: seasons tot=14974 new= 13 mod= 13

2016-06-26 11:47:25.643 /storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv: episodes tot=15570 new= 262 mod= 302

2016-06-26 11:47:25.643 /storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv: broadcasts tot=15570 new= 21 mod= 116

2016-06-26 11:47:25.643 /storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml: grab /storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml

2016-06-26 11:47:25.653 spawn: Executing "/storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml"

2016-06-26 11:51:38.708 spawn: cat: can't open '/storage/.kodi/userdata/addon_data/tools.module.zap2xml/xmltv.xml': No such file or directory

2016-06-26 11:51:38.710 /storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml: no output detected

2016-06-26 11:51:38.710 /storage/.kodi/addons/tools.module.zap2xml/bin/tv_grab_zap2xml: grab returned no data
find quote
clarkss12 Online
Senior Member
Posts: 287
Joined: Mar 2015
Reputation: 2
Post: #25
Here is the log from za2xml log.
Exception
error<class 'urllib2.URLError'>
Traceback (most recent call last):
File "/storage/.kodi/addons/tools.module.zap2xml/zap2xml.py", line 1992, in <module>
main()
File "/storage/.kodi/addons/tools.module.zap2xml/zap2xml.py", line 1902, in main
parseGrid(fn) #data read in and unicode it
File "/storage/.kodi/addons/tools.module.zap2xml/zap2xml.py", line 1082, in parseGrid
p.feed(b)
File "/home/kszaq/OpenELEC.tv-6.0/build.OpenELEC-Amlogic.arm-6.0.3.6/Python-2.7.3/.install_pkg/usr/lib/python2.7/HTMLParser.py", line 114, in feed
File "/home/kszaq/OpenELEC.tv-6.0/build.OpenELEC-Amlogic.arm-6.0.3.6/Python-2.7.3/.install_pkg/usr/lib/python2.7/HTMLParser.py", line 158, in goahead
File "/home/kszaq/OpenELEC.tv-6.0/build.OpenELEC-Amlogic.arm-6.0.3.6/Python-2.7.3/.install_pkg/usr/lib/python2.7/HTMLParser.py", line 324, in parse_starttag
File "/storage/.kodi/addons/tools.module.zap2xml/zap2xml.py", line 704, in handle_starttag
globals()['on_%s' % tag](self, tag, attrs)
File "/storage/.kodi/addons/tools.module.zap2xml/zap2xml.py", line 335, in on_td
data = getURL(urlRoot + "gridDetailService?pgmId=" + cp)
File "/storage/.kodi/addons/tools.module.zap2xml/zap2xml.py", line 209, in getURL
data = br.open(url).get_data()
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_mechanize.py", line 203, in open
return self._mech_open(url, data, timeout=timeout)
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_mechanize.py", line 230, in _mech_open
response = UserAgentBase.open(self, request, data)
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_opener.py", line 193, in open
response = urlopen(self, req, data)
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_urllib2_fork.py", line 344, in _open
'_open', req)
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_urllib2_fork.py", line 332, in _call_chain
result = func(*args)
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_urllib2_fork.py", line 1142, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/storage/.kodi/addons/script.module.mechanize/lib/mechanize/_urllib2_fork.py", line 1118, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno -2] Name or service not known>
find quote
edit4ever Offline
Senior Member
Posts: 171
Joined: Mar 2016
Reputation: 14
Post: #26
couple of questions in figuring this out...

first, are you running both sd2xmltv and zap2xml grabbers on the same tvheadend? If so, which do you have set as the priority?

second, do you have zap2xml set to grab from zap2it or tvguide?

from the second log, it looks like it is having trouble getting to the url of zap2it or tvguide - therefore it is not pulling the data to create the xmltv file.

the file size for the zip file should be 74.9KB

You might want to uninstall the zap2xml addon and reinstall. The uninstall will not delete your user settings...although I might recommend deleting those files after you uninstall and then you'll have a clean install.

Let me know how it goes.


Current Kodi addon projects: zap2xml, sd4tvh and tvh2kodi (tvh config from inside Kodi)
Testing ATSC single and dual tuners on RPi3, KII Pro and M8S
find quote
clarkss12 Online
Senior Member
Posts: 287
Joined: Mar 2015
Reputation: 2
Post: #27
first, are you running both sd2xmltv and zap2xml grabbers on the same tvheadend? If so, which do you have set as the priority?

Yes, both are running. How do I set the priority?

second, do you have zap2xml set to grab from zap2it or tvguide?

Set for Zap2it.

the file size for the zip file should be 74.9KB

Yes, that one does work.

You might want to uninstall the zap2xml addon and reinstall. The uninstall will not delete your user settings...although I might recommend deleting those files after you uninstall and then you'll have a clean install.

Doing that now, actually done it a couple of times now and rebooted each time. Still waiting to see if it works. If it does not, I will install this older version, and see it it works. "tools.module.zap2xml-0.2"
find quote
clarkss12 Online
Senior Member
Posts: 287
Joined: Mar 2015
Reputation: 2
Post: #28
I uninstalled zap2xml addon, rebooted, re-installed it. Same problem, will not create the xml files. Now I have uninstalled both the SD and zap2 it addons and rebooted. When it comes back up, I will install only your newest zap2it and see it that helps.

It takes time, because when I reboot, it re-scans all my channels again.
find quote
clarkss12 Online
Senior Member
Posts: 287
Joined: Mar 2015
Reputation: 2
Post: #29
With just your newest zap2xml addon installed, same problem. Uninstalled and installed your older version, it did not work either. I rebooted after each uninstall and install.

Now I am only going to install the SD version, which has been working great so far.
find quote
edit4ever Offline
Senior Member
Posts: 171
Joined: Mar 2016
Reputation: 14
Post: #30
I'm thinking you should delete your user settings for zap2xml. After you uninstall the addon, you can either ssh in or just browse over the network to the userdata/addons folder and delete the tools.module.zap2xml folder. I'm wondering if something got messed up when you tried to install the zip from the github download. Then you can cleanly reinstall the addon.

Also - you should make sure you can login to your zap2it account on tvschedule.zap2it.com to make sure there is not an issue there.

As for setting the priority when using more than one grabber - depending on which version of tvhedend you're using - you want to go to the epg grabber module tab and you'll see a priority setting when you select a grabber. The lower the number the higher the priority.

BTW - you shouldn't need to run both in the longrun. I'm guessing you're just doing it for testing purposes. The schedules direct data is the best and if you're going to continue to have that account running, it is the better grabber. It was designed by Astrilchuk and I just ran a build of his version. I may go back and add the option settings to sd2xmltv that I have created for zap2xml.


Current Kodi addon projects: zap2xml, sd4tvh and tvh2kodi (tvh config from inside Kodi)
Testing ATSC single and dual tuners on RPi3, KII Pro and M8S
(This post was last modified: 2016-06-26 20:20 by edit4ever.)
find quote
Post Reply