handle vimeo captchas
This commit is contained in:
1 parent
3dbcf60a3e
commit
74f7c920f6
1 file changed
+19
@@ -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(
|
||||
'<script id="viewer-bootstrap" type="application/json">',
|
||||
|
||||
Reference in new issue
Block a user