motkot
@motkot
Программирование C#.

Пишет что доступ к сайт https://kad.arbitr.ru/ заблокирован и не получается отправить пост запрос. Что сделать?

Написал код который должен при вводе id должен открывать страницу с этим делом. Но выводит такое:

Сайт - https://kad.arbitr.ru/

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width" />
		<title>Доступ заблокирован</title>
		<style type="text/css">
			html, body {
				font-family: 'Arial', sans-serif;
				margin: 0;
				padding: 0;
				background: #f6f9fe;
				overflow: hidden;
			}

			img {
				width: 97px;
				height: 97px;
			}

			h2 {
				margin: 22px 0 0;
				font-weight: normal;
				font-size: 1.54em;
				color: #383c45;
			}

			p {
				margin: 29px 0 0;
				line-height: 1.8em;
				word-spacing: 1px;
				color: #828995;
			}

			a,
			a:link,
			a:hover,
			a:active,
			a:visited {
				text-decoration: none;
				color: #0785bc;
			}

			a:hover {
				text-decoration: underline;
			}

			#container {
				position: absolute;
				text-align: center;
				top: 0;
				right: 0;
				bottom: 0;
				left: 0;
			}

			#message {
				position: absolute;
				left: 0;
				right: 0;
				top: 40%;
				margin-top: -155px;
				height: 310px;
			}

			#second_paragraph {
				margin-top: 14px;
			}

		</style>
	</head>
	<body>
		<div id="container">
			<div id="message">
				<img src="/static/img/blocked.png"  />
				<h2>
					Доступ к сервису недоступен по юридическим причинам!
				</h2>
				<p>
					Чтобы продолжить работу свяжитесь в администратором системы по адресу <a href="mailto:support_kad@pravo.tech">support_kad@pravo.tech</a>.
				</p>
			</div>
		</div>
	</body>
</html>


using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;

namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        async private void button1_MouseClick(object sender, MouseEventArgs e)
        {
            Dictionary<string, string> Params = new Dictionary<string, string>() {
          { "CaseNumbers:", "[А84-1719/2021]" },
          { "Count:", "25" },
          { "Courts:", "[]" },
          { "DateFrom:", "null" },
          { "DateTo:", "null" },
          { "Judges:", "[]" },
          { "Page:", "1" },
          { "Sides:", "[]" },
          { "WithVKSInstances:", "false" },
            };
            var result = await GetRequest("https://kad.arbitr.ru/Kad/SearchInstances", Params);
            var response = await result.Content.ReadAsStringAsync();
            File.WriteAllText(@"C:\Users\forgu_000\Desktop\Новый текстовый документ.txt", response);
        }

        static async private Task<HttpResponseMessage> GetRequest(string Addres, Dictionary<string,string> Params)
        {
            HttpClient http = new HttpClient();
            Uri uri = new Uri(Addres);
            FormUrlEncodedContent content = new FormUrlEncodedContent(Params);
            return await http.PostAsync(uri, content);
        }
    }
}
  • Вопрос задан
  • 1381 просмотр
Пригласить эксперта
Ответы на вопрос 1
solotony
@solotony
покоряю пик Балмера
насколько я понимаю это ссылка относящаяся к их внутреннему API . и судя по всему они вычислят что ты "нелегальный посетитель" и блокируют тебя. лучше подделывайся.
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы