Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13891

How Can i get fc-token from arkose lab in Twitter verification

$
0
0

enter image description here

I am trying to use Selenium in Python to retrieve a specific HTML element, more specifically its value.

`<input type="hidden" id="FunCaptcha-Token" name="fc-token" value="702178f80cd6ade39.2875608305|r=eu-west-1|meta=3|meta_width=558|meta_height=523|metabgclr=transparent|metaiconclr=%23555555|guitextcolor=%23000000|pk=2CB16598-CB82-4CF7-B332-5990DB66F3AB|at=40|ag=101|cdn_url=https%3A%2F%2Fclient-api.arkoselabs.com%2Fcdn%2Ffc|lurl=https%3A%2F%2Faudio-eu-west-1.arkoselabs.com|surl=https%3A%2F%2Fclient-api.arkoselabs.com|smurl=https%3A%2F%2Fclient-api.arkoselabs.com%2Fcdn%2Ffc%2Fassets%2Fstyle-manager">`

How can I retrieve it with Selenium?

I am using the following code:

 token_element =  WebDriverWait(self.driver, 10).until(                EC.presence_of_element_located((By.NAME, "fc-token"))            )            logger.info(f"Token key{token_element}")            publickey = re.search(r'pk=([0-9A-Fa-f-]+)', token_element.get_attribute("value"))            logger.info(f"PUBLIC key{publickey}")

But it's never found. I added a print statement to check the DOM:

print(f"DOM\n {self.driver.page_source}")

But the element is missing.

Can someone help me resolve this problem?

Thanks in advance.


Viewing all articles
Browse latest Browse all 13891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>