using System.Text.RegularExpressions;
public static void Main()
using (var client = new WebClient())
client.Headers.Add("Accept-Language", " en-US");
client.Headers.Add("Accept", " text/html, application/xhtml+xml, */*");
client.Headers.Add("User-Agent", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)");
var webpage = client.DownloadString("https://soundcloud.com");
Regex regex = new Regex(@"<script[^>]+src=""([^""]+)""");
MatchCollection scripts = regex.Matches(webpage);
from Match match in scripts
string scripts_newflatChain = string.Join(" ", scripts_toarray);
var linkParser = new Regex(@"\b(?:https?://|www\.)\S+\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
MatchCollection links = linkParser.Matches(scripts_newflatChain);
foreach (Capture link in links)
var script = client.DownloadString(link.Value);
Regex regex2 = new Regex(@"client_id\s*:\s*""([0-9a-zA-Z]{32})""");
MatchCollection ids = regex2.Matches(script);
foreach (Capture id in ids)
Regex regex3 = new Regex(@"""(.*?)""");
MatchCollection clients = regex3.Matches(id.Value);
foreach (Match id_2 in clients)
Console.WriteLine(id_2.Groups[1].Value);