
    ^j                         d dl mZ d dlZ	 d dlZddlmZ ddl	m
Z
  G d de      Z e        y# e$ r d e_         ed      w xY w)	    )absolute_importNziPlease install the python module v8eval either via pip or download it from https://github.com/sony/v8eval   )JavaScriptInterpreter)templatec                   $     e Zd Z fdZd Z xZS )ChallengeInterpreterc                 ,    t         t        |   d       y )Nv8)superr   __init__)self	__class__s    W/var/www/lego-monitor/venv/lib/python3.12/site-packages/cloudscraper/interpreters/v8.pyr   zChallengeInterpreter.__init__   s    "D248    c                     	 t        j                         j                  t        ||            S # t        t         j
                  f$ r t        d       Y y w xY w)Nz.We encountered an error running the V8 Engine.)v8evalV8evalr   	TypeErrorV8ErrorRuntimeError)r   bodydomains      r   r   zChallengeInterpreter.eval   sI    	K99;##HT6$:;;6>>* 	KIJ	Ks   ,/ $AA)__name__
__module____qualname__r   r   __classcell__)r   s   @r   r   r      s    9
Kr   r   )
__future__r   sysr   ImportErrortracebacklimitr    r   encapsulatedr   r    r   r   <module>r%      sc    & 
D
 $ "
K0 K   5  DC
  C  D  DDs	   / A