i fucking hate bing

This commit is contained in:
lolcat 2025-04-17 20:05:58 -04:00 committed by ngn
parent cdc681a2a6
commit 842fff64e9
Signed by: ngn
GPG Key ID: A3654DF5AD9F641D
2 changed files with 11 additions and 21 deletions

View File

@ -1959,25 +1959,17 @@ class ddg{
if($id === null){
// fallback to getting ID from path
$id = explode("/", $image["path"]);
$id = explode("/th/id/", $image["path"], 2);
for($i=count($id) - 1; $i>0; $i--){
if(count($id) !== 2){
if(trim($id[$i]) != ""){
$id = $id[$i];
break;
}
}
}
if(is_array($id)){
// fuck off, let proxy.php deal with it
// malformed
return $url;
}
$id = $id[1];
}
return "https://" . $image["host"] . "/th/id/" . $id;
}

View File

@ -971,17 +971,15 @@ class qwant{
if($id === null){
// fallback to getting ID from path
$id = explode("/", $image["path"]);
$id = explode("/th/id/", $image["path"], 2);
for($i=count($id) - 1; $i>0; $i--){
if(count($id) !== 2){
if(trim($id[$i]) != ""){
$id = $id[$i];
break;
}
// malformed
return $url;
}
$id = $id[1];
}
if(is_array($id)){