diff --git a/main.cpp b/main.cpp index c522121..add33d0 100644 --- a/main.cpp +++ b/main.cpp @@ -68,7 +68,7 @@ write_data(void* items, size_t item_size, size_t item_count, void* ctx) { } Input -download(const string& address) { +download(const string& address, bool proverka_skorosti) { stringstream buffer; CURL* curl = curl_easy_init(); if(curl) @@ -79,16 +79,20 @@ download(const string& address) { curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer); res = curl_easy_perform(curl); - if (res!=0) - { - res2=curl_easy_strerror(res); - cout< 1) { - in = download(argv[1]); + in = download(argv[1], false); } else { in = input_data(cin, true); } @@ -109,3 +113,4 @@ int main(int argc, char* argv[]) return 0; } +