From 74f7c920f6aa5b5d44959ffa6ba07a49c241e2b5 Mon Sep 17 00:00:00 2001 From: lolcat Date: Mon, 4 Aug 2025 00:18:38 -0400 Subject: [PATCH] handle vimeo captchas --- scraper/vimeo.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/scraper/vimeo.php b/scraper/vimeo.php index 028a222..f9fdb84 100644 --- a/scraper/vimeo.php +++ b/scraper/vimeo.php @@ -614,6 +614,25 @@ class vimeo{ false ); + $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"); + } + $html = explode( '