fixed greppr
This commit is contained in:
		
							parent
							
								
									4e4796bb71
								
							
						
					
					
						commit
						beb08f46e2
					
				| @ -298,9 +298,8 @@ class greppr{ | |||||||
| 			 | 			 | ||||||
| 			$description = | 			$description = | ||||||
| 				$this->fuckhtml | 				$this->fuckhtml | ||||||
| 				->getElementsByFuzzyAttributeValue( | 				->getElementsByClassName( | ||||||
| 					"style", | 					"highlightedDesc", | ||||||
| 					"color:#777777;", |  | ||||||
| 					"p" | 					"p" | ||||||
| 				); | 				); | ||||||
| 			 | 			 | ||||||
| @ -310,9 +309,11 @@ class greppr{ | |||||||
| 			}else{ | 			}else{ | ||||||
| 				 | 				 | ||||||
| 				$description = | 				$description = | ||||||
| 					$this->fuckhtml | 					$this->limitstrlen( | ||||||
| 					->getTextContent( | 						$this->fuckhtml | ||||||
| 						$description[0] | 						->getTextContent( | ||||||
|  | 							$description[0] | ||||||
|  | 						) | ||||||
| 					); | 					); | ||||||
| 			} | 			} | ||||||
| 			 | 			 | ||||||
| @ -325,7 +326,7 @@ class greppr{ | |||||||
| 			$date = | 			$date = | ||||||
| 				strtotime( | 				strtotime( | ||||||
| 					explode( | 					explode( | ||||||
| 						"Added:", | 						":", | ||||||
| 						$this->fuckhtml | 						$this->fuckhtml | ||||||
| 						->getTextContent( | 						->getTextContent( | ||||||
| 							$date[count($date) - 1]["innerHTML"] | 							$date[count($date) - 1]["innerHTML"] | ||||||
| @ -426,4 +427,9 @@ class greppr{ | |||||||
| 		 | 		 | ||||||
| 		return $tokens; | 		return $tokens; | ||||||
| 	} | 	} | ||||||
|  | 	 | ||||||
|  | 	private function limitstrlen($text){ | ||||||
|  | 		 | ||||||
|  | 		return explode("\n", wordwrap($text, 300, "\n"))[0]; | ||||||
|  | 	} | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 lolcat
						lolcat