Error in get_gplay_channels. Globo changed their HTML?

Issue #166 resolved
Michiel van Baak created an issue

Starting today (22-Jun-2017) I now get this error:

11:06:31.390 T:1305346976   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: need more than 2 values to unpack
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.globo.com/addon.py", line 26, in <module>
                                                api = globo.GloboApi(plugin)
                                              File "/storage/.kodi/addons/plugin.video.globo.com/resources/lib/globo.py", line 48, in __init__
                                                self.index.update(self._build_index())
                                              File "/storage/.kodi/addons/plugin.video.globo.com/resources/lib/globo.py", line 55, in _build_index
                                                channels, live = scraper.get_gplay_channels()
                                              File "/storage/.kodi/addons/plugin.video.globo.com/resources/lib/scraper.py", line 94, in get_gplay_channels
                                                channels_dummy, live, dummy = soup.findAll('ul', attrs={'class': 'submenu-desktop'})
                                            ValueError: need more than 2 values to unpack
                                            -->End of Python script error report<--

Looks like globo changed their HTML?

Thanks!

Comments (5)

  1. Johnny Depp

    Yeap it seems to be the case. Here to make it work I had to change in plugin.video.globo.com/resources/lib/scraper.py, @ get_gplay_channels: from:

    channels_dummy, live, dummy = soup.findAll('ul', attrs={'class': 'submenu-desktop'})
    

    to:

    live, dummy = soup.findAll('ul', attrs={'class': 'submenu-desktop'})
    

    On the funny side, apparently they agree with Victor and removed the channels_dummy ;-)

    Have phun!

  2. Michiel van Baak reporter

    Thank you! I see the fix has been committed.

    @bruno_briner could you please release a new version? please. My wife will be thankful (I manually patched the file for now, but told her not to touch anything besides the globo.com icon hahahaha)

  3. Bruno Briner

    @mvanbaak I don't know how to release a new version, I'm still googling how to do it.

    And don't be so strict to your wife, if you've patched the file manually it will be overwritten with the new version when released.

  4. Log in to comment