Răsfoiți Sursa

solofield thumbnail fix

lolcat 1 an în urmă
părinte
comite
435913a1e5
1 a modificat fișierele cu 28 adăugiri și 11 ștergeri
  1. 28 11
      scraper/solofield.php

+ 28 - 11
scraper/solofield.php

@@ -180,17 +180,34 @@ class solofield{
 			
 			if(count($thumb) !== 0){
 				
-				$thumb = [
-					"ratio" => "1:1",
-					"url" =>
-						"https://solofield.net" .
-						$this->fuckhtml
-						->getTextContent(
-							$thumb[0]
-							["attributes"]
-							["src"]
-						)
-				];
+				$uri =
+					$this->fuckhtml
+					->getTextContent(
+						$thumb[0]
+						["attributes"]
+						["src"]
+					);
+				
+				if(stripos($uri, "now_printing") === false){
+					
+					$thumb = [
+						"ratio" => "1:1",
+						"url" =>
+							"https://solofield.net" .
+							$this->fuckhtml
+							->getTextContent(
+								$thumb[0]
+								["attributes"]
+								["src"]
+							)
+					];
+				}else{
+					
+					$thumb = [
+						"ratio" => null,
+						"url" => null
+					];
+				}
 			}else{
 				
 				$thumb = [