From 0cbae117aa2c79f0943a1338bde38401ee7fd009 Mon Sep 17 00:00:00 2001 From: shoucandanghehe Date: Thu, 15 Aug 2024 16:56:10 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20=E5=B0=86=20=5Fparse=5Fpro?= =?UTF-8?q?file=20=E6=94=B9=E6=88=90=E9=9D=99=E6=80=81=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot_plugin_tetris_stats/games/top/api/player.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nonebot_plugin_tetris_stats/games/top/api/player.py b/nonebot_plugin_tetris_stats/games/top/api/player.py index 4e7f2eb..53ce7b7 100644 --- a/nonebot_plugin_tetris_stats/games/top/api/player.py +++ b/nonebot_plugin_tetris_stats/games/top/api/player.py @@ -48,7 +48,8 @@ class Player: ) return self._user_profile - def _parse_profile(self, original_user_profile: bytes) -> UserProfile: + @staticmethod + def _parse_profile(original_user_profile: bytes) -> UserProfile: html = etree.HTML(original_user_profile) user_name = html.xpath('//div[@class="mycontent"]/h1/text()')[0].replace("'s profile", '') today = None