SMAPPNYU / youtube-data-api

A Python Client for collect and parse public data from the Youtube Data API
https://youtube-data-api.readthedocs.io/en/latest/index.html
MIT License
79 stars 31 forks source link

get_video_metadata() fails with error about missing statistics key #19

Closed cbuntain closed 5 years ago

cbuntain commented 5 years ago

Describe the bug In the current implementation of get_video_metadata(), the function fails for me with default parameters. The error is related to a missing statistics key in the parsed JSON result. While I think I can track this issue to the default parser used in get_video_metadata(), even if I provide "statistics" as part of the requested data parts, the error persists.

Expected behavior In the default behavior, this function should return video metadata that includes both statistics and snippet data. The parser should work with this default data.

Desktop (please complete the following information):

yinleon commented 5 years ago

Hey @mabrownnyu, did you resolve this?

mattm401 commented 5 years ago

Similarly bumping into this issue.

Edit: This may actually be fixed, I pulled the latest version and things seem to work (on Windows).

yinleon commented 5 years ago

Should work now: https://github.com/SMAPPNYU/youtube-data-api/blob/master/youtube_api/youtube_api.py#L251