Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

running selenium on google colab

!pip install selenium
!apt-get update # to update ubuntu to correctly run apt install
!apt install chromium-chromedriver
!cp /usr/lib/chromium-browser/chromedriver /usr/bin
import sys
sys.path.insert(0,'/usr/lib/chromium-browser/chromedriver')
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
wd = webdriver.Chrome('chromedriver',chrome_options=chrome_options)
wd.get("https://www.webite-url.com")
Comment

using selenium in google colabs

!pip install selenium
!apt-get update # to update ubuntu to correctly run apt install
!apt install chromium-chromedriver
!cp /usr/lib/chromium-browser/chromedriver /usr/bin
import sys
sys.path.insert(0,'/usr/lib/chromium-browser/chromedriver')
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
wd = webdriver.Chrome('chromedriver',chrome_options=chrome_options)
wd.get("https://www.webite-url.com")
Comment

PREVIOUS NEXT
Code Example
Python :: tkinter label border 
Python :: boucle for python 
Python :: update anaconda from cmd 
Python :: conda install xgboost 
Python :: use incognito mode in selenium 
Python :: download from url using urllib python 
Python :: loop in reverse order using django template 
Python :: python toast notification 
Python :: format python number with commas 
Python :: cv2 crop image 
Python :: add picture to jupyter notebook 
Python :: python find and replace string in file 
Python :: how to scroll down to end of page in selenium python 
Python :: esp32 micropython timer 
Python :: python log with timestamp 
Python :: pandas loop through rows 
Python :: python create uuid 
Python :: linux python installation wheel 
Python :: pandas update with condition 
Python :: python save seaborn plot 
Python :: ValueError: cannot mask with array containing NA / NaN values 
Python :: django flush database 
Python :: DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning. 
Python :: pyspark import f 
Python :: how to set the current working directory in python 
Python :: python all possible combinations of multiple lists 
Python :: discord.py ban 
Python :: how to send a message in a specific channel discord.py 
Python :: popups in tkinter 
Python :: save and load a dictionary python 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =