'Continuous scraping (each second) of dynamic webpage with selenium
I am scraping website with selenium successfully using following code:
import os
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver.Safari()
driver.get("http://10.26.210.148/?page=startpage_multi.html&content=false&lang=cs")
time.sleep(2)
power = driver.find_element(By.ID, "thumb_power_value").get_attribute("innerHTML")
print(power)
I am getting current value of power. I need to scrape each second for the whole week and record the data to excel file.
Could you please guide me on how to do that?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
