mirror of
https://git.lolcat.ca/lolcat/4get.git
synced 2025-09-19 12:04:39 -04:00
i fucking hate bing
This commit is contained in:
parent
e4bf53cdaa
commit
077692db49
2 changed files with 15 additions and 25 deletions
|
@ -1958,23 +1958,15 @@ class ddg{
|
|||
|
||||
if($id === null){
|
||||
|
||||
// fallback to getting ID from path
|
||||
$id = explode("/", $image["path"]);
|
||||
|
||||
for($i=count($id) - 1; $i>0; $i--){
|
||||
|
||||
if(trim($id[$i]) != ""){
|
||||
|
||||
$id = $id[$i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(is_array($id)){
|
||||
$id = explode("/th/id/", $image["path"], 2);
|
||||
|
||||
// fuck off, let proxy.php deal with it
|
||||
return $url;
|
||||
if(count($id) !== 2){
|
||||
|
||||
// malformed
|
||||
return $url;
|
||||
}
|
||||
|
||||
$id = $id[1];
|
||||
}
|
||||
|
||||
return "https://" . $image["host"] . "/th/id/" . $id;
|
||||
|
|
|
@ -971,17 +971,15 @@ class qwant{
|
|||
|
||||
if($id === null){
|
||||
|
||||
// fallback to getting ID from path
|
||||
$id = explode("/", $image["path"]);
|
||||
|
||||
for($i=count($id) - 1; $i>0; $i--){
|
||||
$id = explode("/th/id/", $image["path"], 2);
|
||||
|
||||
if(count($id) !== 2){
|
||||
|
||||
if(trim($id[$i]) != ""){
|
||||
|
||||
$id = $id[$i];
|
||||
break;
|
||||
}
|
||||
// malformed
|
||||
return $url;
|
||||
}
|
||||
|
||||
$id = $id[1];
|
||||
}
|
||||
|
||||
if(is_array($id)){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue