Categories > Coding > C# >
Rscripts.net Hub
Posted
public async void rscripts()
{
WebClient client = new WebClient();
HtmlWeb web = new HtmlWeb();
string url1 = "https://rscripts.net/ajaxSearch?term=" + textBox1.Text.ToLower() + "&user=0";
HtmlAgilityPack.HtmlDocument doc1 = await web.LoadFromWebAsync(url1);
var links = doc1.DocumentNode.SelectNodes("//a");
foreach (var link in links)
{
string href = link.GetAttributeValue("href", "/html/body/div[2]/a");
Debug.WriteLine(href);
HtmlAgilityPack.HtmlDocument doc2 = await web.LoadFromWebAsync("https://rscripts.net" + href);
var images = doc2.DocumentNode.SelectNodes("//img");
for (int i = 1; i < 2 && i < images.Count; i++)
{
var image = images[i];
string src = image.GetAttributeValue("src", "");
if (src.First<char>() == '/')
src = "https://rscripts.net" + src;
}
var Title = doc2.GetElementbyId("title");
string text = Title.InnerHtml;
var Script = doc2.DocumentNode.SelectSingleNode("//a[@id='download']");
string LinkScript = Script.GetAttributeValue("href", "");
if (LinkScript.First<char>() == '/')
LinkScript = "https://rscripts.net" + LinkScript;
string DownloadScript = client.DownloadString(new Uri(LinkScript));
}
}
!!!!!marcus__!!!!!#8611
https://cdn.discordapp.com/attachments/1066053366758780978/1078052772567597127/image.png
Replied
What is the issue?
Cancel
Post
Join our Discord Server at https://discord.gg/uAqUBNhWDa
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post