aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2023-12-27 14:49:17 -0500
committerSquibid <me@zacharyscheiman.com>2023-12-27 14:49:17 -0500
commitc33a109f4846db21ca06e76826064348b9ee77e8 (patch)
tree1f96c336b4aa28103d71302abd89679fa9b5e70b
parent01095099968a632d8fde0ab93d25943e3bfb087c (diff)
downloadwallheaven-c33a109f4846db21ca06e76826064348b9ee77e8.tar.gz
wallheaven-c33a109f4846db21ca06e76826064348b9ee77e8.tar.bz2
wallheaven-c33a109f4846db21ca06e76826064348b9ee77e8.zip
add user-agent to most requests and update other user agents
Diffstat (limited to '')
-rw-r--r--misc/curlproxy.php6
-rw-r--r--scrapers/wallhaven.php1
2 files changed, 4 insertions, 3 deletions
diff --git a/misc/curlproxy.php b/misc/curlproxy.php
index 82766d7..0a5cf3e 100644
--- a/misc/curlproxy.php
+++ b/misc/curlproxy.php
@@ -99,7 +99,7 @@ class proxy {
$curl,
CURLOPT_HTTPHEADER,
[
- "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0",
+ "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/120.0",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
"Accept-Language: en-US,en;q=0.5",
"Accept-Encoding: gzip, deflate",
@@ -119,7 +119,7 @@ class proxy {
$curl,
CURLOPT_HTTPHEADER,
[
- "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0",
+ "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/120.0",
"Accept: image/avif,image/webp,*/*",
"Accept-Language: en-US,en;q=0.5",
"Accept-Encoding: gzip, deflate",
@@ -242,7 +242,7 @@ class proxy {
}
curl_setopt( $curl, CURLOPT_HTTPHEADER, [
- "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0",
+ "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/120.0",
"Accept: image/avif,image/webp,*/*",
"Accept-Language: en-US,en;q=0.5",
"Accept-Encoding: gzip, deflate, br",
diff --git a/scrapers/wallhaven.php b/scrapers/wallhaven.php
index 78f56c7..56b44c7 100644
--- a/scrapers/wallhaven.php
+++ b/scrapers/wallhaven.php
@@ -15,6 +15,7 @@
if ($data)
$url = sprintf("%s?%s", $url, http_build_query($data));
}
+ curl_setopt($curl, CURLOPT_HEADER, "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/120.0");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);