-
-
Save LeftofZen/89382609801e5adbc3fec6826a0d9f80 to your computer and use it in GitHub Desktop.
rsforum_scraper_for_aussies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Net; | |
using System.Text.RegularExpressions; | |
while (true) | |
{ | |
Console.WriteLine("scraping"); | |
using WebClient client = new(); | |
var url = @$"https://secure.runescape.com/m=forum/forums?320,321,123,65921801,goto,9999"; | |
string html = client.DownloadString(url); | |
var regex = Regex.Match(html, "<span class=\"forum-post__body\">(.*)<\\/span>"); | |
foreach (var match in regex.Groups.Values) | |
{ | |
var str = match.Captures.First().Value; | |
if (Regex.Match(str, "AEST|AEDT|Australia|Aus|Aussie").Success) | |
{ | |
Console.WriteLine("aussie found"); | |
Console.WriteLine(str); | |
} | |
} | |
Thread.Sleep(10_000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment