From 0d98d7839d1c3da75b95ef29ce12ef54a2a20094 Mon Sep 17 00:00:00 2001 From: lolcat Date: Thu, 16 May 2024 17:22:49 -0400 Subject: added greppr support also btw im not dead --- scraper/sc.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'scraper/sc.php') 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=([^"]+)/', -- cgit v1.2.3