mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
⚡️ 将 _parse_profile 改成静态方法
This commit is contained in:
@@ -48,7 +48,8 @@ class Player:
|
|||||||
)
|
)
|
||||||
return self._user_profile
|
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)
|
html = etree.HTML(original_user_profile)
|
||||||
user_name = html.xpath('//div[@class="mycontent"]/h1/text()')[0].replace("'s profile", '')
|
user_name = html.xpath('//div[@class="mycontent"]/h1/text()')[0].replace("'s profile", '')
|
||||||
today = None
|
today = None
|
||||||
|
|||||||
Reference in New Issue
Block a user