CaTzil / service.subtitles.napisy24pl

Napisy24.pl is Addon for searching and downloading subtitles from KODI
GNU General Public License v2.0
8 stars 10 forks source link

IndexError at video_file_size = column2[4] #26

Open uowiec opened 3 years ago

uowiec commented 3 years ago

When searching for any movie subtitles I get:

                                            Error Type: <type 'exceptions.IndexError'>
                                            Error Contents: list index out of range
                                            Traceback (most recent call last):
                                              File "/home/kodi/.kodi/addons/service.subtitles.napisy24pl/service.py", line 152, in <module>
                                                search(item)
                                              File "/home/kodi/.kodi/addons/service.subtitles.napisy24pl/service.py", line 33, in search
                                                subtitles_list = helper.get_subtitle_list(item)
                                              File "/home/kodi/.kodi/addons/service.subtitles.napisy24pl/resources/lib/NapisyUtils.py", line 106, in get_subtitle_list
                                                search_results = self._search_movie(item)
                                              File "/home/kodi/.kodi/addons/service.subtitles.napisy24pl/resources/lib/NapisyUtils.py", line 208, in _search_movie
                                                video_file_size = column2[4]
                                            IndexError: list index out of range
                                            -->End of Python script error report<--

This is probably caused because the BS returns <br/> (the xhtml style closing tag) istead of the<br> as originally returned from server in line: column2 = "".join([str(x) for x in column2.contents]) Possible solution would be: 205: column2 = [x.strip() for x in filter(None, column2.split("<br/>"))] or configure BS to force single tags closing style (fix the content to either <br> or <br/>)

CaTzil commented 3 years ago

Thank you for reporting this issue, I've tested on latest Kodi (19 final)

Looks like there some issue with the zip extraction method, it doesn't work for movies nor tv-shows

CaTzil commented 3 years ago

@uowiec what version of kodi & plugin do you use?

uowiec commented 3 years ago

@uowiec what version of kodi & plugin do you use?

Kodi on Ubuntu: 2:18.9+git20201024.0821-final-0bionic plugin: service.subtitles.napisy24pl v2.0.3 plugin: script.module.beautifulsoup4 v4.6.2