Closed Danielv123 closed 4 years ago
OK, I've identified the problem: Only the last 4 seasons of this series is available online. But the code stores the seasons as a list and indexes that list by season number. So the length of the list is only 4, but the index (season) is 11. I think one solution would be to rewrite using a dictionary instead (maybe using the season-ids as keys), such that you can look up any season no matter how many are available.
Works perfectly, thanks a lot! Will have to go through cleaning up all the mislabeled downloads now.
Describe the bug Unable to download recent seasons of Mesternes Mester
To Reproduce Steps to reproduce the behavior:
Run nrkdownload -d . -a https://tv.nrk.no/serie/mesternes-mester/sesong/10/episode/1/avspiller
See error
Traceback (most recent call last): File "/home/danielv/.local/bin/nrkdownload", line 11, in <module> sys.exit(main()) File "/home/danielv/.local/lib/python2.7/site-packages/nrkdownload/commandline_script.py", line 80, in main download_url(url, download_all=arguments.all, download_last=arguments.last) File "/home/danielv/.local/lib/python2.7/site-packages/nrkdownload/commandline_script.py", line 95, in download_url programs = parse_nrk_url.parse_url(url) File "/home/danielv/.local/lib/python2.7/site-packages/nrkdownload/parse_nrk_url.py", line 92, in parse_url episode = series.seasons[season_number - 1].episodes[episode_number - 1] IndexError: list index out of range
Expected behavior Episode starts downloadingScreenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
This issue happens for anything past halfway through season 4 for this show.