This repository was archived by the owner on Jan 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
52 lines (45 loc) · 1.79 KB
/
Program.cs
File metadata and controls
52 lines (45 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Media;
using System.Net.Http;
using System.Reflection;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string url = "http://old.reddit.com/user/AutoLovepon"; // Replace with the desired URL
using (HttpClient client = new HttpClient())
{
while (true)
{
try
{
client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36");
HttpResponseMessage response = await client.GetAsync(url);
response.EnsureSuccessStatusCode(); // Ensure a successful status code
string html = await response.Content.ReadAsStringAsync();
// Check if the word "" is found
if (html.Contains(""))
{
// Play a sound
//SystemSounds.Asterisk.Play();
SystemSounds.Asterisk.Play();
Thread.Sleep(1000);
SystemSounds.Beep.Play();
Thread.Sleep(1000);
SystemSounds.Exclamation.Play();
Thread.Sleep(1000);
SystemSounds.Hand.Play();
Thread.Sleep(1000);
SystemSounds.Question.Play();
}
}
catch (HttpRequestException ex)
{
Console.WriteLine("Error: " + ex.Message);
}
await Task.Delay(TimeSpan.FromSeconds(10)); // Delay for 10 seconds
}
}
}
}