diff options
author | lolcat <will@lolcat.ca> | 2024-05-16 17:22:49 -0400 |
---|---|---|
committer | lolcat <will@lolcat.ca> | 2024-05-16 17:22:49 -0400 |
commit | 0d98d7839d1c3da75b95ef29ce12ef54a2a20094 (patch) | |
tree | c51d5a0dcfc99d91211b65ed9692974305a72c90 /scraper/sc.php | |
parent | f8d46df1e858401d93c5fa885777113994a03c86 (diff) |
added greppr support also btw im not dead
Diffstat (limited to 'scraper/sc.php')
-rw-r--r-- | scraper/sc.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/scraper/sc.php b/scraper/sc.php index e2e7385..2b847c7 100644 --- a/scraper/sc.php +++ b/scraper/sc.php @@ -398,12 +398,17 @@ class sc{ if($token === false){ - $js = - $this->get( - $proxy, - "https://a-v2.sndcdn.com/assets/1-c3e4038d.js", - [] - ); + try{ + $js = + $this->get( + $proxy, + "https://a-v2.sndcdn.com/assets/1-c3e4038d.js", + [] + ); + }catch(Exception $error){ + + throw new Exception("Failed to fetch search token"); + } preg_match( '/client_id=([^"]+)/', |