From e443642b81479c5c5a34d8b17b9cb9ba683b63ca Mon Sep 17 00:00:00 2001 From: Johannes Wong Date: Sun, 12 Mar 2023 09:46:57 -0700 Subject: [PATCH] Forgot to handle query parameters when parsing new bilibili site code --- src/you_get/extractors/bilibili.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/you_get/extractors/bilibili.py b/src/you_get/extractors/bilibili.py index 4ac82a26..2d748b70 100644 --- a/src/you_get/extractors/bilibili.py +++ b/src/you_get/extractors/bilibili.py @@ -368,7 +368,15 @@ class Bilibili(VideoExtractor): initial_state = {} for dic in pinitial_state: - if dic['link'] == self.url.rstrip('/'): + query_start = self.url.find('?') + url = "" + + if query_start > 0: + url = self.url[0:query_start].rstrip('/') + else: + url = self.url.rstrip('/') + + if dic['link'] == url: initial_state = dic break