
    5JgR$                         d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl	m
Z d dlmZ d dlZd dl Z d dlZd dlmZ d d	lmZ d dlmZ d
efdZy)    N)	webdriver)Service)WebDriverWait)By)expected_conditions)Options)logger)decodeinspect_linkc           
      Z   t        j                  dt        |       z          t        j                         }|j                  d       |j                  d       |j                  d       |j                  d       |j                  d       |j                  d       |j                  d       |j                  d	       d
ddddi}d|_        t        d      }t        j                  |||      }|j                  di        	 |j                  d       t        |d      j                  t        j                  t         j"                  df            }|j%                  d|  d|       |j%                  d|       t'        j(                  d       d }|j*                  D ]  }|j,                  st        t/        |j,                  j0                  |j,                  j2                  j                  dd                  }|j5                  d      sot        |dd j7                         j9                  dd      d z         j;                  d!      j/                  d"      }	t=        j>                  |	      } n t'        j(                  d       |jA                          |jC                          ||r|jC                          S S # tD        $ rN}
t        j                  d#t        |
      z          |jC                          Y d }
~
|r|jC                          y y d }
~
ww xY w# |r|jC                          w w xY w)$Nz!SELENIUMNEXECUTOR TRYING TO GET: z--no-sandboxz--remote-debugging-pipez--headless=newz--ignore-ssl-errors=yesz--ignore-certificate-errorsz$--blink-settings=imagesEnabled=falsez--disable-dev-shm-usagez--disable-gpuproxyzIhttp://alex133769:mArgare1he_country-de_streaming-1@geo.iproyal.com:12321zlocalhost,127.0.0.1)httphttpsno_proxyzchrome-linux64/chromez!chromedriver-linux64/chromedriver)serviceoptionsseleniumwire_optionszNetwork.enablezhttps://csfloat.com/checker   zmat-input-0zarguments[0].value = ''z.arguments[0].dispatchEvent(new Event('input'))   zContent-Encodingidentityzb'{"iteminfo":   z\xe2\x84\xa2u   ™}zutf-8unicode_escapezSELENIUMEXECUTOR FUCKED UP: )#r	   errorstrucChromeOptionsadd_argumentbinary_locationr   r   Chromeexecute_cdp_cmdgetr   untilECelement_to_be_clickabler   IDexecute_scripttimesleeprequestsresponser
   bodyheaders
startswithstripreplaceencodejsonloadsdelete_all_cookiesquit	Exception)r   chrome_optionsr   webdriver_servicebrowser	url_inputiteminforesaidsdreckes              ./var/www/highfloat_scraper/SeleniumExecutor.pygetItemInforC      s   
LL4s<7HHI%%'N/ 9: 01 9: => FG 9:0_`-
G &=N" CD'8.gnoG,b1 12!'2.44R5O5OQSQVQVXePf5gh	!7~QGSOQZ[

1## 		C||6#,,"3"3S\\5I5I5M5MN`bl5mno??#56Qr
 0 0 2 : :;Le TWZ Z[bbcjkrr  tD  EE#zz%0H		 	

1""$ LLN   3c!f<=LLN 
 LLN s9   B)J; -AJ; BJ; ;	L1L5L LL L*)r*   seleniumwirer   !selenium.webdriver.chrome.servicer   selenium.webdriver.support.uir   selenium.webdriver.common.byr   selenium.webdriver.supportr   r&   !selenium.webdriver.chrome.optionsr   r4   HelperFunctionsLoggingFormatterr	   seleniumwire.utilsr
   $seleniumwire.undetected_chromedriverundetected_chromedriverr   r   rC        rB   <module>rQ      s;   |  " 5 7 + @ 5    # % 1
:c :rP   