我正在试用yt iframe python库。 以下代码:
channel = yt.channel('https://www.youtube.com/user/ouramazingspace') # (Required)
width = '560' # (Optional)
height = '315' # (Optional)
responsive = True # (Optional)
# Fixed size iframes
iframes = yt.getFrames(channel, width=width, height=height)
# Responsive iframes
iframes = yt.getFrames(channel, responsive=responsive)
给出了错误:
Traceback (most recent call last):
File "app.py", line 18, in <module>
iframes = yt.getFrames(channel, responsive=responsive)
File "D:\Level 4\PROJECT\PetProjects\SplitFrames\venv\lib\site-packages\yt_iframe\yt.py", line 134, in getFrames
frame = videoResponsive(vid, width=width, height=height)
TypeError: videoResponsive() got an unexpected keyword argument 'width'
请帮我解决这个问题
看起来库在库的第134行传递了无效的参数,所以这不容易解决,因为这不是您创建的bug
我只是查找了API文档,videoResponsive()似乎没有包含
width
关键字参数。这不是您的代码的问题,而是您正在使用的库/包的问题,因为这就是bug的来源。我建议尝试另一个库,或者在库的github页面上提出请求或提出问题,以便维护人员修复bug我在github上打开了一张罚单来修复bug here
相关问题 更多 >
编程相关推荐