Ask coding questions

← Back to all posts
chromium in python?
ChanceCook

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 [earned 5 cycles]
View Answer
Voters
DiveshTheReal
ChanceCook
Comments
hotnewtop
ch1ck3n
JermeralBlevins

@ch1ck3n is selenium faster than webbot

ch1ck3n

@JermeralBlevins they are both the same speed

ChanceCook

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

JermeralBlevins
GRbetancourt

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

ChanceCook

@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

@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

JermeralBlevins

@ChanceCook what does no sandbox do?

ChanceCook

@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

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

PHSL

Thanks <3