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

ERROR: iaHxBCTP6-g: "token" parameter not in video info for unknown reason #22282

Closed
yongbok1102 opened this issue Sep 1, 2019 · 0 comments
Closed

Comments

@yongbok1102
Copy link

@yongbok1102 yongbok1102 commented Sep 1, 2019

I've written a Python source code like this :

#coding=utf-8
import cv2
import pafy

#YouTube 동영상 url (제목 : [동심파괴 더빙] 설탕이 아니야!)
url = 'https://www.youtube.com/watch?v=iaHxBCTP6-g'

video = pafy.new(url) #YouTube url로부터 pafy.backend_youdube_dl.YtdlPafy 클래스 객체 생
print('title=', video.title)
print('video rating=',video.rating)
print('video durarion=',video.duration)

best = video.getbest(preftype='webm') #비디오 파일양식 webm의 최적의 pafy.backend_youtube_dl.YtdlStream 클래스 객체 생성
print('best resolution', best.resolution)

cap = cv2.VideoCapture(best.url)
while True :
retval, frame = cap.read()

if not retval : 
    break

cv2.imshow('frame',frame)

gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
edges = cv2.Canny(gray,100,200) #에지 검출
cv2.imshow('edges',edges)

key = cv2.waitKey(25)

if key == 27 : 
    break

cv2.destroyAllWindows()

But when I ran this source code, the error occured. The message is written below.

ERROR: iaHxBCTP6-g: "token" parameter not in video info for unknown reason; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "D:\Python37\lib\site-packages\youtube_dl\YoutubeDL.py", line 792, in extract_info
ie_result = ie.extract(url)
File "D:\Python37\lib\site-packages\youtube_dl\extractor\common.py", line 507, in extract
ie_result = self._real_extract(url)
File "D:\Python37\lib\site-packages\youtube_dl\extractor\youtube.py", line 1654, in _real_extract
video_id=video_id)
youtube_dl.utils.ExtractorError: iaHxBCTP6-g: "token" parameter not in video info for unknown reason; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Python37\lib\site-packages\pafy\backend_youtube_dl.py", line 38, in _fetch_basic
self._ydl_info = ydl.extract_info(self.videoid, download=False)
File "D:\Python37\lib\site-packages\youtube_dl\YoutubeDL.py", line 815, in extract_info
self.report_error(compat_str(e), e.format_traceback())
File "D:\Python37\lib\site-packages\youtube_dl\YoutubeDL.py", line 620, in report_error
self.trouble(error_message, tb)
File "D:\Python37\lib\site-packages\youtube_dl\YoutubeDL.py", line 590, in trouble
raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: iaHxBCTP6-g: "token" parameter not in video info for unknown reason; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Devel\python_opencv\ch002\0209.py", line 8, in
video = pafy.new(url) #YouTube url로부터 pafy.backend_youdube_dl.YtdlPafy 클래스 객체 생
File "D:\Python37\lib\site-packages\pafy\pafy.py", line 124, in new
return Pafy(url, basic, gdata, size, callback, ydl_opts)
File "D:\Python37\lib\site-packages\pafy\backend_youtube_dl.py", line 29, in init
super(YtdlPafy, self).init(*args, **kwargs)
File "D:\Python37\lib\site-packages\pafy\backend_shared.py", line 96, in init
self._fetch_basic()
File "D:\Python37\lib\site-packages\pafy\backend_youtube_dl.py", line 41, in _fetch_basic
raise IOError(str(e).replace('YouTube said', 'Youtube says'))
OSError: ERROR: iaHxBCTP6-g: "token" parameter not in video info for unknown reason; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

I wonder the reason the error occured and want it to be solved.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.