KBlixt / Movie-Extra-Downloader

Download movie extras from Youtube.
MIT License
25 stars 6 forks source link

KeyError: 'average_rating' #15

Closed CorentinWicht closed 7 months ago

CorentinWicht commented 7 months ago

Dear @KBlixt,

Many thanks for your great script, I am giving it a try for the first on my Synology DS118 NAS.

I managed to make it work pretty nicely, but then when I test it on a simple folder here is what happens:

python Movie-Extra-Downloader.py -d '/volume1/Media/Films/The Lorax'
Downloading tmdb movie search page.
working on directory: ".../The Lorax"
Downloading tmdb movie search page.
Downloading tmdb movie search page.
processing: The Lorax
Downloading youtube search result.
[youtube] UQ6t4eEOaUA: Downloading webpage
[youtube] UQ6t4eEOaUA: Downloading player 2923e6f1
Traceback (most recent call last):
  File "/volume1/homes/wichtco/Movie-Extra-Downloader/Movie-Extra-Downloader.py", line 211, in <module>
    handle_directory(args.directory)
  File "/volume1/homes/wichtco/Movie-Extra-Downloader/Movie-Extra-Downloader.py", line 117, in handle_directory
    download_extra(directory, extra_config, tmp_folder)
  File "/volume1/homes/wichtco/Movie-Extra-Downloader/main.py", line 135, in download_extra
    process_trailers_config(tmp_folder)
  File "/volume1/homes/wichtco/Movie-Extra-Downloader/main.py", line 11, in process_trailers_config
    finder.search()
  File "/volume1/homes/wichtco/Movie-Extra-Downloader/extra_finder.py", line 129, in search
    video = create_youtube_video()
  File "/volume1/homes/wichtco/Movie-Extra-Downloader/extra_finder.py", line 64, in create_youtube_video
    if youtube_video['average_rating'] is None:
KeyError: 'average_rating'

Could it be that youtube video metadata do not contain an average_rating field anymore?

Best,

C.

KBlixt commented 7 months ago

Yeah, I'm sorry but this script haven't been maintained and since youtube change quite frequently it's quite broken by this point.

I will not return to this project and will put it into archive mode. I just haven't thought about it in a while.

Someday I hope to revisit the concept of this project. But I don't have the time to build this at this point of my life. If I ever revisit the project I will be building it from scratch since the project was built before I learned how to structure a project appropriately.

Sorry.

If you find a way to get it to work, feel free to let me know and I'll fix it for others stumbling upon this tool.