Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tools:selenium [2025/02/24 21:54] – [Test] darron | tools:selenium [2025/02/26 12:49] (current) – [Test] darron | ||
---|---|---|---|
Line 24: | Line 24: | ||
< | < | ||
python -m pip install --upgrade pip | python -m pip install --upgrade pip | ||
- | pip install selenium | + | python -m pip install selenium |
+ | </ | ||
+ | |||
+ | ==Install tools== | ||
+ | |||
+ | Here are a few tool which can be useful for tidying HTML content | ||
+ | for evaluation and for storing scraped data in a [[: | ||
+ | |||
+ | < | ||
+ | python -m pip install lxml | ||
+ | python -m pip install beautifulsoup4 | ||
+ | python -m pip install " | ||
+ | python -m pip install dotenv | ||
</ | </ | ||
Line 37: | Line 49: | ||
</ | </ | ||
+ | __bash__ | ||
+ | < | ||
+ | alias py="/ | ||
+ | </ | ||
===Test=== | ===Test=== | ||
Line 45: | 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(" | options.add_argument(" | ||
driver = webdriver.Chrome(options=options) | driver = webdriver.Chrome(options=options) | ||
+ | # FIREFOX | ||
# | # | ||
#driver = webdriver.Firefox(options=options) | #driver = webdriver.Firefox(options=options) | ||
- | driver.get(" | + | driver.implicitly_wait(60) |
- | sleep(30) | + | driver.get(" |
driver.quit() | driver.quit() | ||
</ | </ | ||
- | Incognito | + | CHROME incognito |
- | about 30 seconds | + | about 30 seconds |
===Resources=== | ===Resources=== | ||
[[https:// | [[https:// | ||