diff --git a/Program.cs b/Program.cs index 8d60b0b..3962526 100644 --- a/Program.cs +++ b/Program.cs @@ -6,15 +6,15 @@ public class Program { Console.WriteLine("Starting"); - IWebDriver driver = new FirefoxDriver(); - // Base url: https://downsub.com/?url=https%253A%252F%252Fwww.youtube.com%252Fwatch%253Fv%253D // Finished url: https://downsub.com/?url=https%253A%252F%252Fwww.youtube.com%252Fwatch%253Fv%253D + video id - string[] lines = File.ReadAllLines(@"/nfs/andre/Archive/Vtuber/Hologra/hologra_downloaded.txt"); + string[] lines = File.ReadAllLines(@"/nfs/andre/Archive/Vtuber/Hologra/archive/hologra_downloaded.txt"); foreach (string line in lines) { string videoId = line.Substring(8, 11); string fullUrl = "https://downsub.com/?url=https%253A%252F%252Fwww.youtube.com%252Fwatch%253Fv%253D" + videoId; + IWebDriver driver = new FirefoxDriver(); + driver.Navigate().GoToUrl(fullUrl); Thread.Sleep(5000); @@ -30,6 +30,9 @@ public class Program { sub.Click(); Thread.Sleep(3000); + string fileName = "/nfs/andre/Archive/Vtuber/Hologra/archive/hologra_downloaded.txt"; + File.WriteAllLines(fileName, File.ReadAllLines(fileName).Where(l => l != line).ToList()); + driver.Close(); }