Skip to content

Commit

Permalink
🔖 release: v2.0.0-beta.31, Python 3.12 support (#194)
Browse files Browse the repository at this point in the history
* 🔖 release: v2.0.0-beta.31, Python 3.12 support

* ⬆️ deps: update deps and lockfile

* ✅ tests: disable username test and add a notice
  • Loading branch information
SigureMo committed Nov 18, 2023
1 parent 5f49f5d commit 1880fc2
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 124 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.18
LABEL maintainer="siguremo" \
version="2.0.0-beta.30" \
version="2.0.0-beta.31" \
description="light-weight container based on alpine for yutto"

RUN set -x \
Expand Down
230 changes: 115 additions & 115 deletions poetry.lock

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "yutto"
version = "2.0.0-beta.30"
version = "2.0.0-beta.31"
description = "🧊 一个可爱且任性的 B 站视频下载器"
authors = ["Nyakku Shigure <[email protected]>"]
license = "GPL-3.0"
Expand All @@ -24,9 +24,7 @@ classifiers = [

[tool.poetry.dependencies]
python = "^3.9.0"
aiohttp = { extras = [
"speedups",
], version = "^3.9.0-beta.0", allow-prereleases = true }
aiohttp = { extras = ["speedups"], version = "^3.9.0" }
aiofiles = "^23.0.0"
biliass = "1.3.7"
colorama = { version = "^0.4.6", markers = "sys_platform == 'win32'" }
Expand All @@ -35,9 +33,9 @@ dict2xml = "1.7.3"

[tool.poetry.group.dev.dependencies]
pytest = "^7.2.2"
pyright = "^1.1.335"
pytest-rerunfailures = "^11.0"
ruff = "^0.1.5"
pyright = "^1.1.336"
pytest-rerunfailures = "^12.0"
ruff = "^0.1.6"

[tool.poetry.scripts]
yutto = "yutto.__main__:main"
Expand Down
1 change: 1 addition & 0 deletions tests/test_api/test_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ async def test_get_user_space_all_videos_avids():


@pytest.mark.api
@pytest.mark.ignore
@as_sync
async def test_get_user_name():
mid = MId("100969474")
Expand Down
2 changes: 1 addition & 1 deletion yutto/__version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 发版需要同时改这里和 pyproject.toml
from __future__ import annotations

VERSION = "2.0.0-beta.30"
VERSION = "2.0.0-beta.31"
3 changes: 3 additions & 0 deletions yutto/api/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from yutto._typing import AvId, BvId, FavouriteMetaData, FId, MId, SeriesId
from yutto.api.user_info import encode_wbi, get_wbi_img
from yutto.exceptions import NotLoginError
from yutto.utils.console.logger import Logger
from yutto.utils.fetcher import Fetcher


Expand Down Expand Up @@ -46,6 +47,8 @@ async def get_user_name(session: ClientSession, mid: MId) -> str:
await Fetcher.touch_url(session, "https://www.bilibili.com")
user_info = await Fetcher.fetch_json(session, space_info_api, params=params)
assert user_info is not None
if user_info["code"] != 0:
Logger.error(f"获取用户名失败,错误信息:{user_info['message']},可尝试添加参数 `-c` 登录账号后重试")
return user_info["data"]["name"]


Expand Down

0 comments on commit 1880fc2

Please sign in to comment.