mirror of
https://github.com/Rongronggg9/SlashBot.git
synced 2025-02-06 17:23:28 +08:00
[O] Remove @ symbol before trying to find username
This commit is contained in:
parent
c4bac8a97e
commit
85d3dd6a6c
@ -20,7 +20,7 @@ else:
|
||||
|
||||
# Find someone's full name by their username
|
||||
def find_name_by_username(username: str) -> str:
|
||||
r = requests.get(f'https://t.me/{username}')
|
||||
r = requests.get(f'https://t.me/{username.replace("@", "")}')
|
||||
return re.search('(?<=<meta property="og:title" content=").*(?=")', r.text, re.IGNORECASE).group(0)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user