- скрипт
- import requests
- session = requests.Session()
- response = session.post('http://*', data={'username': '*', 'password': '*'})
- if response.status_code == 200:
- print('Авторизация прошла успешно')
- else:
- print('Ошибка авторизации')
- response = session.get('http://*/UI/Dashboard')
- print(response.text)
- ответ сервера
- ❯ python ./main.py
- Авторизация прошла успешно python ./main.py
- <!DOCTYPE html>
- <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta charset="utf-8" />
- <meta name="robots" content="noindex, nofollow"/>
- <link rel='shortcut icon' type='image/x-icon' href='../favicon.ico' />
- <script src="../libs/jquery.min.js"></script>
- <script src="../libs/jquery.dataTables.min.js"></script>
- <script src="../libs/handlebars.min.js"></script>
- <script src="../libs/moment.min.js"></script>
- <script src="../libs/handlebarsmoment.js"></script>
- <script src="../bootstrap/bootstrap.min.js"></script>
- <script src="../libs/bootstrap-notify.js"></script>
- <link href="../bootstrap/bootstrap.min.css" rel="stylesheet">
- <link href="../animate.css" rel="stylesheet">
- <link href="../custom.css?changed=20220721002" rel="stylesheet">
- <title>Jackett</title>
- </head>
- <body>
- <div id="page">
- <img id="logo" src="../jacket_medium.png" /><span id="header-title">Jackett</span>
- <hr />
- <h1>Login</h1>
- <form action="Dashboard" method="post">
- <div class="input-area">
- <span class="input-header">Admin password</span>
- <input id="password" name="password" class="form-control input-right" type="password">
- </div>
- <div class="input-area">
- <input type="submit" value="Login" />
- </div>
- </form>
- </div>
- </body>
- </html>