Python 从网页中获取少量项目时遇到问题

Python 从网页中获取少量项目时遇到问题,python,python-3.x,selenium,selenium-webdriver,web-scraping,Python,Python 3.x,Selenium,Selenium Webdriver,Web Scraping,我已经用python结合selenium编写了一个脚本来解析网页中的一些项目。反正我也不能让它工作。我要查找的项目(可能)在iframe中。我试着切换,但没有任何效果。我仍然没有得到任何东西,除了TimeoutException当它到达我试图切换iframe的线路时。我怎样才能让它工作呢。提前感谢: 以下是网页链接: 我关注的项目所在的元素: <div class="quick"> <span class="apply-common-tooltip">5</

我已经用python结合selenium编写了一个脚本来解析网页中的一些项目。反正我也不能让它工作。我要查找的项目(可能)在
iframe
中。我试着切换,但没有任何效果。我仍然没有得到任何东西,除了
TimeoutException
当它到达我试图切换
iframe
的线路时。我怎样才能让它工作呢。提前感谢:

以下是网页链接:

我关注的项目所在的元素:

<div class="quick">
    <span class="apply-common-tooltip">5</span>
    <span class="apply-common-tooltip">1h</span>
    <span class="apply-common-tooltip selected">1D</span>
    <span class="apply-common-tooltip">1M</span>
    <span class="apply-common-tooltip">1D</span>
</div>
这是它在web上的外观:


位于两个嵌套iFrame内的必需节点,因此需要逐个切换到它们。请注意,动态生成第二个的
id
/
name
。试着换一个

wait.until(EC.frame_to_be_available_and_switch_to_it((By.ID, "tradingview_fe623")))


你简直不可能,安德森先生。是的,你成功了。
5
1h
1D
1M
1D
wait.until(EC.frame_to_be_available_and_switch_to_it((By.ID, "tradingview_fe623")))
wait.until(EC.frame_to_be_available_and_switch_to_it((By.CSS_SELECTOR, ".abs")))
wait.until(EC.frame_to_be_available_and_switch_to_it((By.CSS_SELECTOR, "iframe[id^='tradingview_']")))