After much research, I use a different script that works very well.
This is available at: https://github.com/clark17/tv_grab_FR_Kazer
Here is how I did it to make it usable:
- Transfer of the script in /usr/bin/ on the NAS.
- I run the script tv_grab_kazer and appears in the console the stream XMLTVV.
- Reboot NAS.
- Then in tvheadend, Configuration, EPG Grabber Grabber Internal I use XMLTV: France Kazer.
- Do remains only to match the tvheadend channels with the xmltv channel tab, column EPG Grabe Source File.