forked from lolcat/4get
		
	i fucking hate bing
This commit is contained in:
		| @@ -1958,23 +1958,15 @@ class ddg{ | |||||||
| 		 | 		 | ||||||
| 		if($id === null){ | 		if($id === null){ | ||||||
| 			 | 			 | ||||||
| 			// fallback to getting ID from path | 			$id = explode("/th/id/", $image["path"], 2); | ||||||
| 			$id = explode("/", $image["path"]); |  | ||||||
| 			 | 			 | ||||||
| 			for($i=count($id) - 1; $i>0; $i--){ | 			if(count($id) !== 2){ | ||||||
| 				 | 				 | ||||||
| 				if(trim($id[$i]) != ""){ | 				// malformed | ||||||
| 					 | 				return $url; | ||||||
| 					$id = $id[$i]; |  | ||||||
| 					break; |  | ||||||
| 				} |  | ||||||
| 			} | 			} | ||||||
| 		} |  | ||||||
| 			 | 			 | ||||||
| 		if(is_array($id)){ | 			$id = $id[1]; | ||||||
| 			 |  | ||||||
| 			// fuck off, let proxy.php deal with it |  | ||||||
| 			return $url; |  | ||||||
| 		} | 		} | ||||||
| 		 | 		 | ||||||
| 		return "https://" . $image["host"] . "/th/id/" . $id; | 		return "https://" . $image["host"] . "/th/id/" . $id; | ||||||
|   | |||||||
| @@ -971,17 +971,15 @@ class qwant{ | |||||||
| 		 | 		 | ||||||
| 		if($id === null){ | 		if($id === null){ | ||||||
| 			 | 			 | ||||||
| 			// fallback to getting ID from path | 			$id = explode("/th/id/", $image["path"], 2); | ||||||
| 			$id = explode("/", $image["path"]); |  | ||||||
| 			 | 			 | ||||||
| 			for($i=count($id) - 1; $i>0; $i--){ | 			if(count($id) !== 2){ | ||||||
| 				 | 				 | ||||||
| 				if(trim($id[$i]) != ""){ | 				// malformed | ||||||
| 					 | 				return $url; | ||||||
| 					$id = $id[$i]; |  | ||||||
| 					break; |  | ||||||
| 				} |  | ||||||
| 			} | 			} | ||||||
|  | 			 | ||||||
|  | 			$id = $id[1]; | ||||||
| 		} | 		} | ||||||
| 		 | 		 | ||||||
| 		if(is_array($id)){ | 		if(is_array($id)){ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user