failed list+fix for repos with colons
This commit is contained in:
		
							parent
							
								
									30bb587c93
								
							
						
					
					
						commit
						3ae0c0204f
					
				
					 1 changed files with 15 additions and 18 deletions
				
			
		|  | @ -96,7 +96,7 @@ namespace RepoFullDownloader_Core | |||
|             { | ||||
|                 link += "/"; | ||||
|             } | ||||
|             string cleanLink = link.Replace("http://", "").Replace("/", "_"); | ||||
|             string cleanLink = link.TrimEnd('/').Replace("http://", "").Replace("https://", "").Replace("/", "_").Replace(":", "_"); | ||||
|             Directory.CreateDirectory($"./output/{cleanLink}"); | ||||
|             WebClient webClient = new WebClient(); | ||||
|             // headers because some repos are 'interesting' | ||||
|  | @ -168,11 +168,10 @@ namespace RepoFullDownloader_Core | |||
|             } | ||||
|             // remove last one because ???? | ||||
|             packages.RemoveAt(packages.Count - 1); | ||||
|             List<string> failed = new List<string>(); | ||||
|             foreach(CydiaPackage p in packages) | ||||
|             { | ||||
|                 // Download all packages on repo | ||||
|                 try | ||||
|                 { | ||||
|                 Random r = new Random(); | ||||
|                 try | ||||
|                 { | ||||
|  | @ -189,13 +188,11 @@ namespace RepoFullDownloader_Core | |||
|                 { | ||||
|                     Console.WriteLine("Could not download " + link + p.link); | ||||
|                     Console.WriteLine(e.Message); | ||||
|                     failed.Add(link + p.link); | ||||
|                 } | ||||
|             } | ||||
|                 catch (ArgumentOutOfRangeException) | ||||
|                 { | ||||
|             Console.WriteLine("Finished downloading " + link); | ||||
|                 } | ||||
|             } | ||||
|             if(failed.Count != 0) File.WriteAllLines($"./output/{cleanLink}/failed.txt", failed); | ||||
|         } | ||||
| 
 | ||||
|         static void DownloadInstallerRepo(string link) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 kawaiizenbo
						kawaiizenbo