dp247 / rakuten-uk-epg

Generates an XMLTV EPG for rakuten.tv/uk
MIT License
2 stars 2 forks source link

First time building something like this and I have a few errors, maybe you can help #3

Open Nostradamus1973 opened 13 hours ago

Nostradamus1973 commented 13 hours ago

So, your script looks totally bad-ass, so, I decided to give it a whirl. I'm not any sort of coder so, please excuse my lack of understanding. This is the error I got:

  File "/home/nostradamus/Downloads/rakuten-uk-epg-c88a3e0103e5940f93d16c9353f89eb13f360ec0/generate.py", line 157, in <module>
    channel_xml = build_xmltv(channels_data, programme_data)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nostradamus/Downloads/rakuten-uk-epg-c88a3e0103e5940f93d16c9353f89eb13f360ec0/generate.py", line 62, in build_xmltv
    subtitle.text = pr.get("subtitle")
    ^^^^^^^^^^^^^
  File "src/lxml/etree.pyx", line 1043, in lxml.etree._Element.text.__set__
  File "src/lxml/apihelpers.pxi", line 749, in lxml.etree._setNodeText
  File "src/lxml/apihelpers.pxi", line 737, in lxml.etree._createTextNode
  File "src/lxml/apihelpers.pxi", line 1530, in lxml.etree._utf8
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters

I THINK the epg.xml updated, however I have no way of importing it into IPTVeditor. Is this what you meant by forking it and listing it on ones own Github page? By hosting it on my own git I can then import it, I think.

Thank you and have a nice night.

Nostradamus1973 commented 12 hours ago

Nevermind, I see how it's built to "Build" after a set time-frame, however support for Node.js is at 20 instead of 16, hence the problem, and way out of my league of understanding how to exactly fix it.

I guess I'll have to wait till you weigh in on this. Thanks again

dp247 commented 3 hours ago

your script looks totally bad-ass

Thank you. This was actually a side thing to the Freeview-EPG I did, but its nice its appreciated all the same lol.

This is the error I got

It was caused by some control characters or null bytes being present, so I wrapped it in a function I had (no idea why I didn't do that the first time LOL)

Is this what you meant by forking it and listing it on ones own Github page?

If you want the UK EPG, you can just throw the link in the readme into your IPTV app and it should be fine. If you want to update it for a different region/more hours, then you can fork this repo (top-right), make your changes, and then use your own link (it will be https://raw.githubusercontent.com///master/epg.xml

however support for Node.js is at 20 instead of 16, hence the problem

Oh yeah, I forgot about this. It doesn't actually cause any issues, its just saying that the actions for checking out the repo and installing Python need updating, which I've done lol.