P
P
pcdesign2020-12-30 09:54:10
Python
pcdesign, 2020-12-30 09:54:10

How to pull out the value on the site, if it is behind two nested iframes?

I need to pull out one value from the site
https://m.ru.investing.com/commodities/us-corn-adv...

5fec2670c9c85955309279.png

But it's tricky. With three nested iframes

import time
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(ChromeDriverManager(version="87.0.4280.88").install())

driver.get('https://m.ru.investing.com/commodities/us-corn-advanced-chart')
time.sleep(15)
driver.switch_to.frame(2)


And here I am stuck.
PS: There's still the right mouse button does not work. Zayuzal plugin https://addons.mozilla.org/ru/firefox/addon/absolu... for fox.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
soremix, 2020-12-30
@pcdesign

Need a specific cursor position? It lies quietly in the code, without any iframes
<span class="lastInst pid-8918-last">464,60</span>

N
Nadim Zakirov, 2020-12-30
@zkrvndm

If nested domains are from the same domain, you can simply use contentWindow.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question