mirror of
https://git.bakhai.co.in/FbIN/4Get.git
synced 2025-11-05 12:31:30 +05:30
Synced
fixed bing images failing to load, added flickr(ff8b1addf7) fixed bing images failing to load, added flickr (ff8b1addf7) // (077692db49// (ff8b1addf7/scraper/qwant.php// (566680fe36) // (8d07e72dfe) // (4b85841a3e)
This commit is contained in:
parent
78a6af66cc
commit
5ff2b87c2e
6 changed files with 561 additions and 36 deletions
|
|
@ -1943,10 +1943,33 @@ class ddg{
|
|||
|
||||
private function bingimg($url){
|
||||
|
||||
$parse = parse_url($url);
|
||||
parse_str($parse["query"], $parts);
|
||||
$image = parse_url($url);
|
||||
|
||||
return "https://" . $parse["host"] . "/th?id=" . urlencode($parts["id"]);
|
||||
$id = null;
|
||||
if(isset($image["query"])){
|
||||
|
||||
parse_str($image["query"], $str);
|
||||
|
||||
if(isset($str["id"])){
|
||||
|
||||
$id = $str["id"];
|
||||
}
|
||||
}
|
||||
|
||||
if($id === null){
|
||||
|
||||
$id = explode("/th/id/", $image["path"], 2);
|
||||
|
||||
if(count($id) !== 2){
|
||||
|
||||
// malformed
|
||||
return $url;
|
||||
}
|
||||
|
||||
$id = $id[1];
|
||||
}
|
||||
|
||||
return "https://" . $image["host"] . "/th/id/" . $id;
|
||||
}
|
||||
|
||||
private function bingratio($width, $height){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue