Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix when checking video from live stream #214

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

laxa
Copy link

@laxa laxa commented Jul 30, 2018

Videos from live streams are not always working (this is an assumption), for example, with the develop branch, pip3 install --user youtube-dl and the following video https://www.youtube.com/watch?v=vsDknmK30C0, the following stacktrace is observed:

>>> import pafy
>>> pafy.new("https://www.youtube.com/watch?v=vsDknmK30C0")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/laxa/Documents/pafy/pafy/pafy.py", line 124, in new
    return Pafy(url, basic, gdata, size, callback, ydl_opts=ydl_opts)
  File "/home/laxa/Documents/pafy/pafy/backend_youtube_dl.py", line 31, in __init__
    super(YtdlPafy, self).__init__(*args, **kwargs)
  File "/home/laxa/Documents/pafy/pafy/backend_shared.py", line 97, in __init__
    self._fetch_basic()
  File "/home/laxa/Documents/pafy/pafy/backend_youtube_dl.py", line 53, in _fetch_basic
    self._author = self._ydl_info['uploader']
KeyError: 'uploader'

The following PR resolves this issue, the video is then playable inside mpsyt. This partially solves issue #193

@laxa laxa changed the title fix when checking video from live steam fix when checking video from live stream Apr 8, 2019
Copy link

@belgianguy belgianguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can attest that this fix was needed to be able to open a LiveStream (LabPadre SpaceX livestream) through pafy (using VidGear)
I got the exact same error that Laxa got, which was resolved (and the live stream showed up)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants