summary refs log tree commit diff stats
path: root/advice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'advice.cpp')
-rw-r--r--advice.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/advice.cpp b/advice.cpp index ab16571..c3852b0 100644 --- a/advice.cpp +++ b/advice.cpp
@@ -101,6 +101,8 @@ void advice::run() const
101 curl::curl_easy lsthandle(lstios); 101 curl::curl_easy lsthandle(lstios);
102 std::string lsturl = pictured.getNotion().getImageNetUrl(); 102 std::string lsturl = pictured.getNotion().getImageNetUrl();
103 lsthandle.add<CURLOPT_URL>(lsturl.c_str()); 103 lsthandle.add<CURLOPT_URL>(lsturl.c_str());
104 lsthandle.add<CURLOPT_CONNECTTIMEOUT>(30);
105 lsthandle.add<CURLOPT_TIMEOUT>(300);
104 106
105 try 107 try
106 { 108 {
@@ -158,6 +160,7 @@ void advice::run() const
158 imghandle.add<CURLOPT_HTTPHEADER>(headers.get()); 160 imghandle.add<CURLOPT_HTTPHEADER>(headers.get());
159 imghandle.add<CURLOPT_URL>(url.c_str()); 161 imghandle.add<CURLOPT_URL>(url.c_str());
160 imghandle.add<CURLOPT_CONNECTTIMEOUT>(30); 162 imghandle.add<CURLOPT_CONNECTTIMEOUT>(30);
163 imghandle.add<CURLOPT_TIMEOUT>(300);
161 164
162 try 165 try
163 { 166 {
@@ -202,7 +205,7 @@ void advice::run() const
202 { 205 {
203 throw could_not_get_images(); 206 throw could_not_get_images();
204 } 207 }
205 208
206 std::string title = generator_->generate(); 209 std::string title = generator_->generate();
207 210
208 // Want a 16:9 aspect 211 // Want a 16:9 aspect
@@ -316,7 +319,7 @@ void advice::run() const
316 client_->updateStatus(tweetText, {media_id}); 319 client_->updateStatus(tweetText, {media_id});
317 320
318 std::cout << "Tweeted!" << std::endl << "Waiting..." << std::endl; 321 std::cout << "Tweeted!" << std::endl << "Waiting..." << std::endl;
319 322
320 std::this_thread::sleep_for(std::chrono::hours(1)); 323 std::this_thread::sleep_for(std::chrono::hours(1));
321 } catch (const could_not_get_images& ex) 324 } catch (const could_not_get_images& ex)
322 { 325 {