Skip to content
This repository was archived by the owner on Oct 25, 2020. It is now read-only.
This repository was archived by the owner on Oct 25, 2020. It is now read-only.

KeyError: 'url_encoded_fmt_stream_map' #40

Description

@farhank3389

I get the following error when running yturl 'http://www.youtube.com/watch?v=8TCxE0bWQeQ':

Traceback (most recent call last):
File "/usr/local/bin/yturl", line 8, in <module>
  sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/yturl.py", line 147, in main
  itag_to_url_map = itags_for_video(args.video_id)
File "/usr/local/lib/python3.7/site-packages/yturl.py", line 80, in itags_for_video
  streams = api_response['url_encoded_fmt_stream_map'].split(',')
KeyError: 'url_encoded_fmt_stream_map'

It seems to be an issue with YouTube not returning some metadata for certain videos. pytube has fixed it in pytube/pytube#467, pytube/pytube@e5f1a9e

Edit:
Didn't realise this issue has already been raised and closed, but I'll leave this open for now in case the above fixes in pytube have not been considered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions