Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:selenium [2025/02/25 04:12] – [Windows 10] darrontools:selenium [2025/02/26 12:49] (current) – [Test] darron
Line 24: Line 24:
 <code> <code>
 python -m pip install --upgrade pip python -m pip install --upgrade pip
-pip install selenium +python -m pip install selenium 
 </code> </code>
  
 ==Install tools== ==Install tools==
 +
 +Here are a few tool which can be useful for tidying HTML content
 +for evaluation and for storing scraped data in a [[:tools:wikibase|Wikibase]].
  
 <code> <code>
Line 58: Line 61:
  
 from selenium import webdriver from selenium import webdriver
 +# CHROME
 from selenium.webdriver.chrome.options import Options from selenium.webdriver.chrome.options import Options
 +# FIREFOX
 #from selenium.webdriver.firefox.options import Options #from selenium.webdriver.firefox.options import Options
-from time import sleep 
  
 options = Options() options = Options()
  
 +# CHROME
 options.add_argument("--incognito") options.add_argument("--incognito")
 driver = webdriver.Chrome(options=options) driver = webdriver.Chrome(options=options)
 +# FIREFOX
 #options.add_argument("-private") #options.add_argument("-private")
 #driver = webdriver.Firefox(options=options) #driver = webdriver.Firefox(options=options)
  
-driver.get("https://www.deckenmalerei.eu/") +driver.implicitly_wait(60) 
-sleep(30)+driver.get("https://www.kewl.org/") 
 driver.quit() driver.quit()
 </code> </code>
  
-Incognito mode was found to be a requirement on a Linux host otherwise chromium would wait+CHROME incognito mode was found to be a requirement on a Linux host otherwise chromium would wait
 about 30 seconds before opening the URL. about 30 seconds before opening the URL.
 ===Resources=== ===Resources===