Comments (6)
Unable to reproduce in local, it looks like the CI network environment may not be able to get the backup_url
. We can remove the site api test like bilix info 'https://www.bilibili.com/xxx'
temporarily.
from bilix.
which python version are you using?
from bilix.
I can reproduce it in my local
==> Testing bilix
/opt/homebrew/Library/Homebrew/test.rb (Formulary::FromPathLoader): loading /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/b/bilix.rb
==> /opt/homebrew/Cellar/bilix/0.18.6/bin/bilix info https://www.bilibili.com/video/av20203945/
INFO Directory videos not exists, auto created
Traceback (most recent call last):
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/bilix/download/utils.py", line 90, in wrapped
return await func(client, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/bilix/sites/bilibili/api.py", line 400, in get_video_info
return await _get_video_info_from_html(client, url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/bilix/sites/bilibili/api.py", line 410, in _get_video_info_from_html
video_info = VideoInfo.parse_html(url, res.text)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/bilix/sites/bilibili/api.py", line 377, in parse_html
dash = Dash.from_dict(play_info)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/bilix/sites/bilibili/api.py", line 233, in from_dict
m = Media(quality=quality, codec=d['codecs'], **d)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/pydantic/main.py", line 164, in __init__
__pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pydantic_core._pydantic_core.ValidationError: 1 validation error for Media
backup_url
Input should be a valid list [type=list_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.5/v/list_type
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/bilix/0.18.6/bin/bilix", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/bilix/cli/main.py", line 374, in main
loop.run_until_complete(cor)
File "/opt/homebrew/Cellar/[email protected]/3.12.1_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 684, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/bilix/sites/bilibili/informer.py", line 88, in temp
await informer.info_key(key)
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/bilix/sites/bilibili/informer.py", line 23, in info_key
await self.parse_url(key)(self, key)
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/bilix/sites/bilibili/informer.py", line 36, in info_video
video_info = await api.get_video_info(self.client, url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/bilix/0.18.6/libexec/lib/python3.12/site-packages/bilix/download/utils.py", line 94, in wrapped
raise APIParseError(e, func) from e
bilix.exception.APIParseError: APIParseError Caused by ValidationError in <bilix.sites.bilibili.api:get_video_info>
from bilix.
In some area(overseas), backup_url
is unavailable so the pydanticV2 validation failed. I believe it's not related to python version(I tried 3.12 and 3.11). Can you try the master branch? I made some properties optional so it should pass the validation.
from bilix.
I will do the master branch test later.
from bilix.
@HFrost0 the build patch works for me, closing the issue now.
from bilix.
Related Issues (20)
- httpx.RemoteProtocolError: <ConnectionTerminated error_code:0, last_stream_id:1999, additional_data:None> HOT 1
- 根据你们的文档操作,但是不能 HOT 2
- 这个怎么下载字幕呢,用 bilix v https://www.bilibili.com/video/BV18g4y1U7zR --subtitle 不行! HOT 2
- 下载时判断当前目录名,如果所在目录为 videos (不区分大小写) 则不新建目录 HOT 1
- 请求添加自定义输出文件名的功能 HOT 2
- 使用get_up获取某个up的所有投稿视频的时候,可能会获取到已经失效的视频?然后get_video_info就会发生报错?
- ImportError due to deprecated 'cgi' module in Python 3.13
- api错误 HOT 1
- 报错
- 报错 HOT 2
- bilix.exception.APIParseError: APIParseError Caused by KeyError in <bilix.sites.bilibili.api:get_up_video_info> HOT 1
- python和vc++都是最新的,为啥报错 HOT 2
- Specify profile directory with from-browser
- Python 调用如何使用cookie? HOT 1
- bilix0.18.8执行报错 HOT 4
- mac下载的视频文件只有音频,没有画面 HOT 4
- 下载b站视频合集时,raise EndOfStream from None
- New feat: BaseDownloader can switch to faster url when provided multiple urls for same resource
- 请问可以通过api接口的形式访问吗 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bilix.