Categories > Coding > C# >

Rscripts.net Hub

Posts: 3

Threads: 2

Joined: Feb, 2023

Reputation: 0

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));
            }
        }
  • 0

marcus__

S.K.I.D

vip

Posts: 343

Threads: 19

Joined: Nov, 2022

Reputation: 28

Replied

give more info etc9 doc9umentation

sorry my keyboard is broken idfk why

  • 0

!!!!!marcus__!!!!!#8611

https://cdn.discordapp.com/attachments/1066053366758780978/1078052772567597127/image.png

Posts: 22

Threads: 3

Joined: Mar, 2023

Reputation: 1

Replied

What is the issue?

  • 0

Join our Discord Server at https://discord.gg/uAqUBNhWDa

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )