#登录aiohttp后如何获取参数

How to get parameters after # sign in aiohttp

我的服务器正在收到来自 url 的请求,例如

http://127.0.0.1:8050/get_request#a=ABCD&b=EFG

request.rel_url returns 仅 /get_request

我如何在 # 之后获得部分?

嗯,看来只有 js 能读懂。我是第一次编写 js,但这就是我想出的:

(该页面正在用浏览器打开)

<!doctype html>
<html lang="ru">
<head>
  <meta charset="utf-8" />
  <title></title>
  <link rel="stylesheet" href="style.css" />
</head>
<body>
<script type="text/javascript">
if (document.URL.indexOf("#") != -1)
{
    var this_url = document.URL.replace("#", "?");
    const request = new XMLHttpRequest();
    request.open('GET', this_url);
    request.setRequestHeader('Content-Type', 'application/x-www-form-url');
    request.send(); 
}
</script> 
</body>
</html>