aboutsummaryrefslogtreecommitdiff
path: root/src/Infobox
diff options
context:
space:
mode:
authorfrosty <gabriel@bwaaa.monster>2026-02-27 18:32:23 -0500
committerfrosty <gabriel@bwaaa.monster>2026-02-27 18:32:23 -0500
commit9f2cd561286784fd000eb8a00f1f80db3185062c (patch)
tree14216b6d50b34bab1c7f7ae70d628d3560613f9e /src/Infobox
parent26e3403e039d1a80f2e62f8efe889ad5f40c8cee (diff)
downloadomnisearch-9f2cd561286784fd000eb8a00f1f80db3185062c.tar.gz
added proxying
Diffstat (limited to 'src/Infobox')
-rw-r--r--src/Infobox/Dictionary.c3
-rw-r--r--src/Infobox/Wikipedia.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/Infobox/Dictionary.c b/src/Infobox/Dictionary.c
index a835899..ca4e5cd 100644
--- a/src/Infobox/Dictionary.c
+++ b/src/Infobox/Dictionary.c
@@ -1,4 +1,6 @@
#include "Dictionary.h"
+#include "../Proxy/Proxy.h"
+#include "../Scraping/Scraping.h"
#include <curl/curl.h>
#include <libxml/HTMLparser.h>
#include <libxml/xpath.h>
@@ -216,6 +218,7 @@ InfoBox fetch_dictionary_data(const char *query) {
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &chunk);
curl_easy_setopt(curl, CURLOPT_USERAGENT, "Mozilla/5.0");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+ apply_proxy_settings(curl);
if (curl_easy_perform(curl) == CURLE_OK && chunk.size > 0) {
htmlDocPtr doc = htmlReadMemory(chunk.memory, chunk.size, url, NULL,
diff --git a/src/Infobox/Wikipedia.c b/src/Infobox/Wikipedia.c
index ed4645f..dff26f6 100644
--- a/src/Infobox/Wikipedia.c
+++ b/src/Infobox/Wikipedia.c
@@ -1,4 +1,6 @@
#include "Wikipedia.h"
+#include "../Proxy/Proxy.h"
+#include "../Scraping/Scraping.h"
#include <curl/curl.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
@@ -123,6 +125,7 @@ InfoBox fetch_wiki_data(char *api_url) {
WikiWriteMemoryCallback);
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
+ apply_proxy_settings(curl_handle);
res = curl_easy_perform(curl_handle);