Created
July 7, 2014 08:34
-
-
Save kimerran/dd8f03fe652cc33331ac to your computer and use it in GitHub Desktop.
download FREE ebooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using c = System.Console; | |
using System.IO; | |
using System.Net; | |
namespace StretchUtak | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string[] titles = File.ReadAllLines("Titles.txt"); | |
WebClient client = new WebClient(); | |
foreach (var title in titles) | |
{ | |
string transformed = title.Replace(' ', '_'); | |
c.WriteLine("downloading " + transformed + ".pdf"); | |
string path = String.Format("http://www.syncfusion.com/Content/downloads/ebook/{0}.pdf", transformed); | |
try | |
{ | |
client.DownloadFile(path, transformed + ".pdf"); | |
} | |
catch (Exception) | |
{ | |
c.WriteLine("error downloading: " + transformed + ".pdf"); | |
} | |
} | |
c.Read(); | |
} | |
} | |
} | |
// Titles.txt | |
//Neural Networks Using C Sharp Succinctly | |
//HDInsight Succinctly | |
//LightSwitch Mobile Business Apps Succinctly | |
//BI Solutions Using SSAS Tabular Model Succinctly | |
//Nodejs Succinctly | |
//Twitter Bootstrap Succinctly | |
//AngularJS Succinctly | |
//Visual Studio 2013 Succinctly | |
//Windows Phone8 Development Succinctly | |
//Direct 3D Succinctly | |
//SQL Server Analysis Services Succinctly | |
//Assembly Language Succinctly | |
//ASP.NET Web API Succinctly | |
//Visual Studio Add-Ins Succinctly | |
//Postgres Succinctly | |
//Direct2D Succinctly | |
//windowsazuresqlreporting Succinctly | |
//TypeScript Succinctly | |
//WPF Succinctly | |
//iOS Succinctly | |
//windowsstoreapps Succinctly | |
//Data Structures Succinctly Part 2 | |
//GIS Succinctly | |
//Data Structures Succinctly Part 1 | |
//Objective-C Succinctly | |
//fsharp Succinctly | |
//Knockoutjs Succinctly | |
//Cplusplus Succinctly | |
//aspnetmvc4 Succinctly | |
//LightSwitch Succinctly | |
//JavaScript Succinctly | |
//HTTP Succinctly | |
//PDF Succinctly | |
//Git Succinctly | |
//jQuery Succinctly |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment