fixed google crash
This commit is contained in:
		
							parent
							
								
									1ca2626ad9
								
							
						
					
					
						commit
						81df52235c
					
				| @ -2531,6 +2531,8 @@ class google{ | |||||||
| 							"div" | 							"div" | ||||||
| 						); | 						); | ||||||
| 					 | 					 | ||||||
|  | 					$date = null; | ||||||
|  | 					 | ||||||
| 					if(count($date_div) !== 0){ | 					if(count($date_div) !== 0){ | ||||||
| 						 | 						 | ||||||
| 						foreach($date_div as $div){ | 						foreach($date_div as $div){ | ||||||
| @ -2541,6 +2543,7 @@ class google{ | |||||||
| 									"bottom:" | 									"bottom:" | ||||||
| 								) !== false | 								) !== false | ||||||
| 							){ | 							){ | ||||||
|  | 								 | ||||||
| 								$date = | 								$date = | ||||||
| 									strtotime( | 									strtotime( | ||||||
| 										$this->fuckhtml | 										$this->fuckhtml | ||||||
| @ -2548,7 +2551,6 @@ class google{ | |||||||
| 											$div | 											$div | ||||||
| 										) | 										) | ||||||
| 									); | 									); | ||||||
| 								 |  | ||||||
| 								break; | 								break; | ||||||
| 							} | 							} | ||||||
| 						} | 						} | ||||||
| @ -4147,7 +4149,7 @@ class google{ | |||||||
| 			throw new Exception("Failed to get HTML"); | 			throw new Exception("Failed to get HTML"); | ||||||
| 		} | 		} | ||||||
| 		 | 		 | ||||||
| 		//$html = file_get_contents("scraper/google.html");
 | 		//$html = file_get_contents("scraper/google.txt");
 | ||||||
| 		 | 		 | ||||||
| 		return $this->parsepage($html, "web", $search, $proxy, $params); | 		return $this->parsepage($html, "web", $search, $proxy, $params); | ||||||
| 	} | 	} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 lolcat
						lolcat