summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/curlproxy.php8
-rw-r--r--lib/frontend.php28
2 files changed, 28 insertions, 8 deletions
diff --git a/lib/curlproxy.php b/lib/curlproxy.php
index 846fbb7..7d4ca5d 100644
--- a/lib/curlproxy.php
+++ b/lib/curlproxy.php
@@ -150,7 +150,7 @@ class proxy{
$curl,
CURLOPT_HTTPHEADER,
[
- "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/110.0",
+ "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.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",
@@ -178,7 +178,7 @@ class proxy{
$curl,
CURLOPT_HTTPHEADER,
[
- "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0",
+ "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0",
"Accept: image/avif,image/webp,*/*",
"Accept-Language: en-US,en;q=0.5",
"Accept-Encoding: gzip, deflate",
@@ -380,7 +380,7 @@ class proxy{
$curl,
CURLOPT_HTTPHEADER,
[
- "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/110.0",
+ "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0",
"Accept: image/avif,image/webp,*/*",
"Accept-Language: en-US,en;q=0.5",
"Accept-Encoding: gzip, deflate, br",
@@ -396,7 +396,7 @@ class proxy{
$curl,
CURLOPT_HTTPHEADER,
[
- "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/110.0",
+ "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0",
"Accept: audio/webm,audio/ogg,audio/wav,audio/*;q=0.9,application/ogg;q=0.7,video/*;q=0.6,*/*;q=0.5",
"Accept-Language: en-US,en;q=0.5",
"Accept-Encoding: gzip, deflate, br",
diff --git a/lib/frontend.php b/lib/frontend.php
index 9350230..665f600 100644
--- a/lib/frontend.php
+++ b/lib/frontend.php
@@ -98,7 +98,7 @@ class frontend{
]);
}
- public function drawtextresult($site, $greentext = null, $duration = null, $keywords, $tabindex = true){
+ public function drawtextresult($site, $greentext = null, $duration = null, $keywords, $tabindex = true, $customhtml = null){
$payload =
'<div class="text-result">';
@@ -187,7 +187,9 @@ class frontend{
$this->highlighttext($keywords, $site["description"]) .
'</div>';
}
-
+
+ $payload .= $customhtml;
+
$payload .= '</a>';
/*
@@ -764,6 +766,7 @@ class frontend{
'<a href="https://webcache.googleusercontent.com/search?q=cache:' . $urlencode . '" class="list" target="_BLANK"><img src="/favicon?s=https://google.com" alt="go">Google cache</a>' .
'<a href="https://web.archive.org/web/' . $urlencode . '" class="list" target="_BLANK"><img src="/favicon?s=https://archive.org" alt="ar">Archive.org</a>' .
'<a href="https://archive.is/newest/' . htmlspecialchars($link) . '" class="list" target="_BLANK"><img src="/favicon?s=https://archive.is" alt="ar">Archive.is</a>' .
+ '<a href="https://ghostarchive.org/search?term=' . $urlencode . '" class="list" target="_BLANK"><img src="/favicon?s=https://ghostarchive.org" alt="gh">Ghostarchive</a>' .
'<a href="https://www.bing.com/search?q=url%3A' . $urlencode . '" class="list" target="_BLANK"><img src="/favicon?s=https://bing.com" alt="bi">Bing cache</a>' .
'<a href="https://megalodon.jp/?url=' . $urlencode . '" class="list" target="_BLANK"><img src="/favicon?s=https://megalodon.jp" alt="me">Megalodon</a>' .
'</div>';
@@ -835,6 +838,10 @@ class frontend{
case "news":
$get_scraper = isset($_COOKIE["scraper_news"]) ? $_COOKIE["scraper_news"] : null;
break;
+
+ case "music":
+ $get_scraper = isset($_COOKIE["scraper_news"]) ? $_COOKIE["scraper_news"] : null;
+ break;
}
if(
@@ -923,6 +930,14 @@ class frontend{
"mojeek" => "Mojeek"
]
];
+
+ case "music":
+ $filters["scraper"] = [
+ "display" => "Scraper",
+ "option" => [
+ "sc" => "SoundCloud"
+ ]
+ ];
break;
}
@@ -994,6 +1009,11 @@ class frontend{
include "scraper/wiby.php";
$lib = new wiby();
break;
+
+ case "sc":
+ include "scraper/sc.php";
+ $lib = new sc();
+ break;
}
// set scraper on $_GET
@@ -1169,7 +1189,7 @@ class frontend{
$html = null;
- foreach(["web", "images", "videos", "news"] as $type){
+ foreach(["web", "images", "videos", "news", "music"] as $type){
$html .= '<a href="/' . $type . '?s=' . urlencode($query);
@@ -1303,7 +1323,7 @@ class frontend{
return htmlspecialchars($image);
}
- return "/proxy?i=" . urlencode($image) . "&s=" . $format;
+ return "/proxy.php?i=" . urlencode($image) . "&s=" . $format;
}
public function htmlnextpage($gets, $npt, $page){