

Remove selenium logs on console ( More clean! )Ĭhose the webdriver according with your systemĭriver = webdriver.Chrome(chrome_options=options)ĭriver = webdriver.Chrome(executable_path='chromedriver', chrome_options=options) Options.add_experimental_option('excludeSwitches', ) Options.add_argument('-ignore-certificate-errors') Options.add_argument('-disable-dev-shm-usage') Options.add_argument("-proxy-bypass-list=*") Options.add_argument("-proxy-server='direct://'") Options.add_argument("-disable-extensions") Options.add_argument("-allow-running-insecure-content") to see the browser comment this line below Options.add_experimental_option('prefs', prefs) Set a specific folder to download files from selenium ( Default is download folder) Os.mkdir(os.path.dirname(os.path.realpath(_file_)) + '//data')įolder = os.path.dirname(os.path.realpath(_file_)) + '/data'# Set Google Options You will use to check the operational system your bot is running( Windows or Linux )Ĭreate a folder to recieve your donwloads You can use this to wait a specific element loadįrom import WebDriverWaitįrom import expected_conditions as ECįrom import Byįrom import Selectĭownload the webdriver in your project automatic (Just for Windows) Pandas I use to create dataframes and export my information scraped on csv

I use to see the progressive bar in for loops

Very nice to use to get information from html It is very useful to do some time.sleep() and wait any seconds on page. It will download the chrome web driver for Linux. I really like to use selenium, because there are many javascript on the web which most of the time you need to wait for the website to load completely for starting scrap.Īfter that run these commands on Linux in the same folder of your project(.py file)! Developers always are looking for ways to reuse their codes as well, for that, I'm gonna share with you a way to use your selenium code as well.įirst of all, you should install the libs in your project:
