aboutsummaryrefslogtreecommitdiffstats
path: root/scraper/solofield.php
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2024-09-02 00:03:09 -0400
committerlolcat <will@lolcat.ca>2024-09-02 00:03:09 -0400
commit458bd8c1b57d0fea12f424db1aba18c1cbbbccae (patch)
treeccb5677c904a2134a7854cf71e3ca64f64f9de43 /scraper/solofield.php
parentc6cf9afb6e63344d4cc99e18000ed027f300b8f7 (diff)
ok i think i unfucked it
Diffstat (limited to 'scraper/solofield.php')
-rw-r--r--scraper/solofield.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/scraper/solofield.php b/scraper/solofield.php
index c69b8ec..4fe10e4 100644
--- a/scraper/solofield.php
+++ b/scraper/solofield.php
@@ -132,7 +132,10 @@ class solofield{
];
// check for errors and load the result div
- $this->error_and_load($html, $out);
+ if($this->error_and_load($html)){
+
+ return $out;
+ }
$items =
$this->fuckhtml
@@ -272,7 +275,10 @@ class solofield{
];
// check for errors and load the result div
- $this->error_and_load($html, $out);
+ if($this->error_and_load($html)){
+
+ return $out;
+ }
$images =
$this->fuckhtml
@@ -399,7 +405,10 @@ class solofield{
];
// check for errors and load the result div
- $this->error_and_load($html, $out);
+ if($this->error_and_load($html)){
+
+ return $out;
+ }
$items =
$this->fuckhtml
@@ -576,7 +585,7 @@ class solofield{
}
}
- private function error_and_load($html, $out){
+ private function error_and_load($html){
if(strlen($html) === 0){
@@ -603,13 +612,14 @@ class solofield{
if($nosearch){
- return $out;
+ return true;
}
throw new Exception("Failed to grep search list");
}
$this->fuckhtml->load($list);
+ return false;
}
private function unfuckdate($date){
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage