using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
static void Main(string[] args)
HttpClient client = new HttpClient();
Console.WriteLine($"Page {page}");
Dictionary<string, string> p = new Dictionary<string, string>();
p.Add("post_date", "22052018+");
p.Add("sf_paged", page.ToString());
var getResult = client.PostAsync($"https://primariaclujnapoca.ro/urbanism/certificate-de-urbanism/documente-emise/?post_date=22052018+&sf_paged={page}", new FormUrlEncodedContent(p)).Result;
string content = getResult.Content.ReadAsStringAsync().Result;
foreach (var match in Regex.Matches(content, "\"https:\\/\\/primariaclujnapoca.ro\\/urbanism\\/certificate-de-urbanism\\/certificat-de-urbanism[^\"]*"))
string link = match.ToString().TrimStart('"');
getResult = client.GetAsync(link).Result;
content = getResult.Content.ReadAsStringAsync().Result;
if (content.Contains("309361")) Console.WriteLine(link);
Console.WriteLine("Press Enter to close.");