You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And then the error gets thrown (shown below). It's unclear to me which offending call is returning an object of 'NoneType' that then further has no attribute 'group'.
I note that the latest pafy is 0.5.5 but apt-get installs 0.5.2-2. I'm not a big user of pip but would that be my recommended approach here? Anyone know if this is a known issue, or am I missing something else?
Traceback (most recent call last):
File "<pyshell#2>", line 1, in
video = pafy.new(url)
File "/usr/lib/python3/dist-packages/pafy/pafy.py", line 122, in new
return Pafy(url, basic, gdata, size, callback, ydl_opts)
File "/usr/lib/python3/dist-packages/pafy/backend_internal.py", line 42, in _$
super(InternPafy, self).init(*args, kwargs)
File "/usr/lib/python3/dist-packages/pafy/backend_shared.py", line 95, in __i$
self._fetch_basic()
File "/usr/lib/python3/dist-packages/pafy/backend_internal.py", line 50, in _$
allinfo = get_video_info(self.videoid, self.callback)
File "/usr/lib/python3/dist-packages/pafy/backend_internal.py", line 268, in $
sts = re.search(r'sts"\s:\s(\d+)', embed_webpage).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
The text was updated successfully, but these errors were encountered:
This issue is caused by pafy's internal backend being outdated and having troubles with parsing the current YouTube video page. backend_internal.py received last update in November 2018. As mentioned in pafy.py:
youtube-dl not found; you can use the internal backend by setting the environmental variable PAFY_BACKEND to "internal". It is not enabled by default because it is not as well maintained as the youtube-dl backend.
The issue can be solved by installing youtube-dl. You have to install youtube-dl via pip, not via apt.
I figure this has to be simple issue, but I'm not finding a reference to it anywhere.
I'm trying to use pafy on a Raspberry Pi 4, originally booted with Buster from the summer (8/20?) but apt-get upgraded since.
Then sudo apt-get install python3-pafy.
I can't do the simplest example in the documentation without the error cited on the subject line:
And then the error gets thrown (shown below). It's unclear to me which offending call is returning an object of 'NoneType' that then further has no attribute 'group'.
I note that the latest pafy is 0.5.5 but apt-get installs 0.5.2-2. I'm not a big user of pip but would that be my recommended approach here? Anyone know if this is a known issue, or am I missing something else?
======================================================
Traceback (most recent call last):
File "<pyshell#2>", line 1, in
video = pafy.new(url)
File "/usr/lib/python3/dist-packages/pafy/pafy.py", line 122, in new
return Pafy(url, basic, gdata, size, callback, ydl_opts)
File "/usr/lib/python3/dist-packages/pafy/backend_internal.py", line 42, in _$
super(InternPafy, self).init(*args, kwargs)
File "/usr/lib/python3/dist-packages/pafy/backend_shared.py", line 95, in __i$
self._fetch_basic()
File "/usr/lib/python3/dist-packages/pafy/backend_internal.py", line 50, in _$
allinfo = get_video_info(self.videoid, self.callback)
File "/usr/lib/python3/dist-packages/pafy/backend_internal.py", line 268, in $
sts = re.search(r'sts"\s:\s(\d+)', embed_webpage).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
The text was updated successfully, but these errors were encountered: