Ask coding questions

← Back to all posts
chromium in python?
h
ChanceCook (2)

hi,i am wondering if there is any way to get chromium in python,it seems to only be working in bash and i am more comfortable in python.
any suggestions?
this has been resolved and here it is for those who had the same question.
if you want to make your own you can either fork this or go here https://selenium-python.readthedocs.io/
or copy this code into a new python script
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')

driver = webdriver.Chrome(options=chrome_options)
driver.get("https://google.com")

Answered by ch1ck3n (2042) [earned 5 cycles]
View Answer
Comments
hotnewtop
JermeralBlevins (3)

@ch1ck3n is selenium faster than webbot

ch1ck3n (2042)

@JermeralBlevins they are both the same speed

ChanceCook (2)

@ch1ck3n i have learned what selenium is but uh,what the heck is webbot-is it like selenium?

GRbetancourt (1)

how does this work? wanting to make one myself but dont know what to do

ChanceCook (2)

@GRbetancourt ,just make a new python and use these commands in order
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')

driver = webdriver.Chrome(options=chrome_options)
driver.get("https://google.com")

ChanceCook (2)

@ChanceCook all it does is install selenium works as a webdriver,if you do not know what selenium is or how it works,google it

ChanceCook (2)

@JermeralBlevins no sandbox removes unnecessary privileges from processes that dont need them in chrome,also its one of the only ways to stabilize chrome,becasue without it,it will not work/run,if you find a better command please tell me!

GRbetancourt (1)

@ChanceCook thanks, i think i see how most of it works now