|
|
@ -26,8 +26,8 @@ int download(std::string url) { |
|
|
|
curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); |
|
|
|
curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); |
|
|
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, NULL); |
|
|
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, NULL); |
|
|
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp); |
|
|
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp); |
|
|
|
curl_easy_setopt (curl, CURLOPT_VERBOSE, 1L); |
|
|
|
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); |
|
|
|
curl_easy_setopt (curl, CURLOPT_USERAGENT, USER_AGENT); |
|
|
|
curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT); |
|
|
|
curl_easy_perform(curl); |
|
|
|
curl_easy_perform(curl); |
|
|
|
curl_easy_cleanup(curl); |
|
|
|
curl_easy_cleanup(curl); |
|
|
|
fclose(fp); |
|
|
|
fclose(fp); |
|
|
|