summaryrefslogtreecommitdiff
path: root/scraper/sc.php
diff options
context:
space:
mode:
Diffstat (limited to 'scraper/sc.php')
-rw-r--r--scraper/sc.php17
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=([^"]+)/',