diff options
| author | lolcat <will@lolcat.ca> | 2025-08-04 00:39:13 -0400 |
|---|---|---|
| committer | lolcat <will@lolcat.ca> | 2025-08-04 00:39:13 -0400 |
| commit | d3ef1a67c0ff094d5534010311761acbc40ac7b9 (patch) | |
| tree | 3dd8a2cceac78fe7cb0535c006b4610a192af8b1 /scraper/vimeo.php | |
| parent | 9afef55d899edd59f30f4d27d187e10a960e5a9d (diff) | |
aaaaaa part 2
Diffstat (limited to 'scraper/vimeo.php')
| -rw-r--r-- | scraper/vimeo.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scraper/vimeo.php b/scraper/vimeo.php index 37b6a3b..4d95ac5 100644 --- a/scraper/vimeo.php +++ b/scraper/vimeo.php @@ -679,6 +679,25 @@ class vimeo{ throw new Exception("Failed to fetch JWT token"); } + + $this->fuckhtml->load($html); + + $captcha = + $this->fuckhtml + ->getElementsByTagName( + "title" + ); + + if( + count($captcha) !== 0 && + $this->fuckhtml + ->getTextContent( + $captcha[0] + ) == "Vimeo / CAPTCHA Challenge" + ){ + + throw new Exception("Vimeo returned a Captcha"); + } $json = json_decode($json, true); |
