higuita / vodafone.pt-xmltv

xmltv grabber for Vodafone Portugal
GNU General Public License v3.0
10 stars 2 forks source link

Empty xml #4

Closed rickytugapt closed 4 years ago

rickytugapt commented 4 years ago

Hi higuita, i tried to use your script in raspian. I had to install jq and awk dependencies, and after that the script works great but the generated file (attached) has only the header. Do you have an ideia what could be wrong?

1.txt

higuita commented 4 years ago

Hi Did any other output show up in the script? it is strange there is no error... what awk version do you have (check with awk --version), i build this with gawk (gnu awk), maybe it do not work correctly with the nawk version.

rickytugapt commented 4 years ago

Here it is a output print:

script awk_version

higuita commented 4 years ago

i tried it in my rpi and it worked fine. Are you sure you are running the latest version of my script? maybe with some bad luck you grabbed a version with some bug or disabled code.

If the latest version, can you please add a # to the last line, like this: #rm -rf /tmp/vodafone-xml

then run

bash -x tv_grab_pt_vdf3.sh |& tee /tmp/vodafone-xml/debug.log
tar zcvf /tmp/vodafone.tar.gz /tmp/vodafone-xml/

and send me the /tmp/vodafone.tar.gz file , so i can try to understand why it is failing without any error

you have my email in the top of the script

rickytugapt commented 4 years ago

Hi higuita,

I was doing what you asked me, and found that the temp file /tmp/vodafone-xml/channels.json was 0kb. Started digging to find what was the cause, and found an issue with curl not getting data from the site. When i run curl 'https://web.ott-red.vodafone.pt/ott3_webapp/v1/channels' just to check the output i was getting an error: curl: (35) error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small So i searched google and found this: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907788 I made what they suggested right at the second message, they say the site uses a small DH key, so if we can´t upgrade the site key, we should edit /etc/ssl/openssl.cnf and remove ChipherString = DEFAULT@SECLEVEL=2 and after that, voilá, the script is workink like a charm

Anyway, thanks a lot for your help and for your avaliability, and hope this can help other users.

higuita commented 4 years ago

this commit should also make curl fail the script, instead of failing silently thanks for the debug and finding the problem!

maybe the future perl xmltv grabber will not have this problem... lets see :)