lolcat 2 роки тому
батько
коміт
24e9548297
6 змінених файлів з 3559 додано та 1827 видалено
  1. 6 2
      data/config.php
  2. 1 1
      lib/frontend.php
  3. 11 1
      lib/fuckhtml.php
  4. 3540 1822
      scraper/google.php
  5. 0 0
      scraper/spotify.json
  6. 1 1
      scraper/yep.php

+ 6 - 2
data/config.php

@@ -101,12 +101,16 @@ class config{
 		"https://search.milivojevic.in.rs",
 		"https://4get.snine.nl",
 		"https://4get.datura.network",
-		"https://4get.neco.lol"
+		"https://4get.neco.lol",
+		"https://4get.lol",
+		"https://4get.ch",
+		"https://4get.edmateo.site",
+		"https://4get.sudovanilla.org"
 	];
 	
 	// Default user agent to use for scraper requests. Sometimes ignored to get specific webpages
 	// Changing this might break things.
-	const USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0";
+	const USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0";
 	
 	// Proxy pool assignments for each scraper
 	// false = Use server's raw IP

+ 1 - 1
lib/frontend.php

@@ -1302,7 +1302,7 @@ class frontend{
 			return htmlspecialchars($image);
 		}
 		
-		return "/proxy?i=" . urlencode($image) . "&s=" . $format;
+		return "/proxy.php?i=" . urlencode($image) . "&s=" . $format;
 	}
 	
 	public function htmlnextpage($gets, $npt, $page){

+ 11 - 1
lib/fuckhtml.php

@@ -240,7 +240,17 @@ class fuckhtml{
 	public function getElementsByFuzzyAttributeValue(string $name, string $value, $collection = null){
 		
 		$elems = $this->getElementsByAttributeName($name, $collection);
-		$value = explode(" ", $value);
+		$value =
+			explode(
+				" ",
+				trim(
+					preg_replace(
+						'/ +/',
+						" ",
+						$value
+					)
+				)
+			);
 		
 		$return = [];
 		

Різницю між файлами не показано, бо вона завелика
+ 3540 - 1822
scraper/google.php


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
scraper/spotify.json


+ 1 - 1
scraper/yep.php

@@ -275,7 +275,7 @@ class yep{
 		curl_setopt($curlproc, CURLOPT_SSL_VERIFYPEER, true);
 		curl_setopt($curlproc, CURLOPT_CONNECTTIMEOUT, 30);
 		curl_setopt($curlproc, CURLOPT_TIMEOUT, 30);
-
+		
 		$this->backend->assign_proxy($curlproc, $proxy);
 		
 		$data = curl_exec($curlproc);

Деякі файли не було показано, через те що забагато файлів було змінено