️ 将 _parse_profile 改成静态方法

This commit is contained in:
2024-08-15 16:56:10 +08:00
parent 25dc57d911
commit 0cbae117aa

View File

@@ -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