public
Last active

Downloads all the music from keygenjukebox.com

  • Download Gist
KeyGenJukebox Downloader
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Text.RegularExpressions;
using System.IO;
 
namespace KGJ_DL
{
class Program
{
static void Main(string[] args)
{
string
download_dir = "Downloads/",
kgj_url = "http://keygenjukebox.com/",
kgj_subdir = "m/";
if (!Directory.Exists(download_dir))
Directory.CreateDirectory(download_dir);
WebClient wc = new WebClient();
string data = wc.DownloadString(kgj_url);
MatchCollection mc = Regex.Matches(data, "value=\".+?\"");
for (int i = 0; i < mc.Count; i++)
{
if (mc[i].Value.EndsWith("mp3\""))
{
string path = mc[i].Value.Substring(7, mc[i].Value.Length - 8);
Console.ForegroundColor = ConsoleColor.Green;
try
{
if (!File.Exists(download_dir + path))
wc.DownloadFile(kgj_url + kgj_subdir + path, download_dir + path);
else
Console.ForegroundColor = ConsoleColor.Blue;
}
catch { Console.ForegroundColor = ConsoleColor.Red; }
Console.WriteLine((i + 1).ToString() + ": " + path);
}
}
Console.ReadLine();
}
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.