From fd7d6b97de6f7fa4de277243a98103226e6ea5d1 Mon Sep 17 00:00:00 2001 From: Zhao Zuohong Date: Thu, 23 Feb 2023 21:44:10 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20adding=20AV=20number?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- video/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/video/__init__.py b/video/__init__.py index b14ff39..c5e2db6 100644 --- a/video/__init__.py +++ b/video/__init__.py @@ -21,7 +21,8 @@ class Video: ) else: self.number = "AV" + video_number[2:] - self.v = video.Video(aid=self.number) + self.v = video.Video(aid=int(video_number[2:])) + return if video_number[:2].upper() != "BV": raise InvalidVideoNumberException(f"Invalid video number {video_number}!") else: