mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-25 09:37:38 +00:00
10 lines
227 B
Python
10 lines
227 B
Python
|
def from_url_get_authkey(url: str) -> str:
|
||
|
"""从 UEL 解析 authkey
|
||
|
:param url: URL
|
||
|
:return: authkey
|
||
|
"""
|
||
|
try:
|
||
|
return url.split("authkey=")[1].split("&")[0]
|
||
|
except IndexError:
|
||
|
return url
|