Skip to content

Commit

Permalink
trying to fix download
Browse files Browse the repository at this point in the history
  • Loading branch information
ELY M committed Oct 14, 2024
1 parent f88d0ba commit 718fca9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/download.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ bool downloadFile(const char *url, const char *filename)



curl_slist_append(headers, "Accept: text/html");
curl_slist_append(headers, "Content-Type: text/html");
//curl_slist_append(headers, "charsets: utf-8");
curl_slist_append(headers, "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8");
curl_slist_append(headers, "Content-Type: application/json");
curl_slist_append(headers, "charsets: utf-8");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(curl, CURLOPT_USERAGENT, "Weather Text for Nintendo Switch by ELY M. contact money@mboca.com");
Expand Down Expand Up @@ -148,7 +148,7 @@ int xferinfo(curl_off_t dltotal, curl_off_t dlnow) {
}

if (dlnow == dltotal && dltotal > 0 && once == false) {
printf("\n "); // lol, is required
printf("\n"); // lol, is required
once = true;
}

Expand Down
8 changes: 8 additions & 0 deletions weather.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>

0 comments on commit 718fca9

Please sign in to comment.