tvgrabbers / tvgrabnlpy

Deze versie is deprecated zie: tvgrabpyAPI
https://github.com/tvgrabbers/tvgrabpyAPI
GNU General Public License v2.0
27 stars 8 forks source link

Cannot open url https://web-api-pepper.horizon.tv/oesp #76

Closed TonVH closed 7 years ago

TonVH commented 7 years ago

Since a few days I cannot do the configure run anymore. Is this my fault or .....? Attached is the full output. Naamloos.txt

Terminal output: Last login: Thu Jan 26 08:43:47 on ttys000 /Applications/_EyeTV/XMLgen/XMLgen.config.command ; exit; iMac:~ tonio$ /Applications/_EyeTV/XMLgen/XMLgen.config.command ; exit; Using config file: /Applications/_EyeTV/XMLgen/XMLgen.config The channel/source matching data on github is newer! Wild FM changed name to Wild Hitradio. PRIME is now Play More. Verifying the database Creating config file: /Applications/_EyeTV/XMLgen/XMLgen.config Cannot open url https://web-api-pepper.horizon.tv/oesp/api/NL/nld/web/channels/: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:590) Unable to get channel info from horizon.tv Not all channel info could be retreived. Try again in 15 minutes or so; or disable the failing source. Closing down logout Saving session... ...copying shared history... ...saving history...truncating history files... ...completed. Deleting expired sessions...none found.

[Proces voltooid]

kyl416 commented 7 years ago

Try updating to the latest version of Python 2.7.13 https://www.python.org/ftp/python/2.7.13/python-2.7.13-macosx10.6.pkg

hikavdh commented 7 years ago

I concur with Kyle. As this seems to be an ssl issue, which needs at least 2.7.9, when support was back ported from Python 3. So very possible further ssl issues are fixed in later Python 2.7 versions. Possibly a certificate update could also help.

TonVH commented 7 years ago

Updated Python but still keep the same error message.

Maybe unimportant but if I open "https://web-api-pepper.horizon.tv/oesp/api/NL/nld/web/channels/" in Safari I get a enormous page full of information about programs and more.

So what do I do next? No idea how to update a certificate.

hikavdh commented 7 years ago

It's a json page so you should get a page full with unformatted data. Have you tried updating your CA certificates? Your browser has its own CA cetificates, so it working there says little. Maybe they are in the openssl package, but probably it is a separated package as it is in Gentoo. Without more info I have no other suggestions.

TonVH commented 7 years ago

I don't have the faintest idea what "CA Certificates" are or how to update them. "tv_grab_nl.py" runs on a Mac

hikavdh commented 7 years ago

CA stands for Certificate Authority. They provide and verify the certificates used for secure connections like https. Certificates have a limited live-span, so the verification certificates from the CA's need to be updated regularly. Those updates are probably classed security updates. As your error indicates a problem in the SSL handshake, which mainly is a certificate verification... Look on your favorite Mac forum.

TonVH commented 7 years ago

I use Mac nog for over >15 years and have never had to do with Certificates.

Can this part not be run without SSL? Or can I disable horizon.tv (thru config) because I now get alle information that I need so it seems superfluous?

hikavdh commented 7 years ago

No you can't as horizon uses https. https://github.com/tvgrabbers/tvgrabnlpy/wiki/Over_de_configuratie#disable_source

TonVH commented 7 years ago
  1. Isn't what you are writing a contradiction? You say :no" but give a link that does.

  2. If I assume the second )=the link) then I understand that if I add "--disable-detail-source 5" ( 5 = horizon.tv) to CLI "tv_grab_nl.py" then the problem disappears? But will there arise other problems?

hikavdh commented 7 years ago

Two questions. Two answers

hikavdh commented 7 years ago

Yes you can add it to the command or you can add "disable-detail-source = 5" to your configuration file. If you run --configure together with "--disable-detail-source 5" no channelids for horizon will afterwards be in your configuration, so until you run --configure with source 5 enabled again it will effectively be disabled as if you placed it in your configuration file.

An other alternative is trying version 3. It uses a different (more stable) module for fetching the pages, so possibly your problem will not arise there.

kyl416 commented 7 years ago

I don't have a Mac, so I can't give you step by step instructions on how to do this.

Most of the advice I see online involving this error says you also need to update the following modules: pyOpenSSL: https://pypi.python.org/pypi/pyOpenSSL ndg-httpsclient: https://pypi.python.org/pypi/ndg-httpsclient pyasn1: https://pypi.python.org/pypi/pyasn1

TonVH commented 7 years ago

@hikavdh: With version 3 you mean v3 of tv_grab_nl?

Dl'ed that, put it all in a new folder and made the .py's executable. But both setup.py & tv_grab_nl3.py report error "no module named pytz.

@kyl416: Will look into that later. At first sight I am afraid it wil be way above my knowledge of Python.

hikavdh commented 7 years ago

If you read the install instructions for tvgrappyAPI, it contains a link to pytz. This module is for timezone support. Very possible you can install it through regular Mac methods as it is an often used module.

hikavdh commented 7 years ago

Kyle got around to get an OSX install and found that indeed probably Mac forgot to issue a security update on this. He also found that the issue is absent on version 3 with the much smarter requests module. So either try to get pytz installed, wait till Kyle finds time to give a roadmap on updating CAcertificates or look elsewhere on how to do that. The last two options probably involve compiling! The fourth option is to wait till Mac comes around to issuing a relevant security update!