banner



How To Install Chromedriver In Ubuntu

# Install Chrome Browser and Chromedriver Ubuntu 20.04

This guide will prove you lot how to ready an Ubuntu Virtual Individual Server (VPS) for web scrapping with Selenium. Python and Selenium are really useful for scrapping JS based websites that load dynamically. Traditional scrapping does not work with dynamic sites that load content on the wing. Selenium uses a chrome browser and goes through the website like a normal person would, clicking on buttons and links.

This type of coding is also generally used for operation testing, stress testing a website by simulating multiple instances of real-users visiting the site. These expensive stress testing SaaS applications, that accuse an arm and a leg typically use this blazon of coding at some signal in the dorsum-end to simulate website traffic.

# Pre-Requisites

All these steps assume that you lot are already inside of a virtual server. We are working with an Ubuntu Virtual Server 20.04 from Digital Ocean. This type of code needs to run from a server for many practical reasons, but if yous are in-doubtfulness - Spider web scrapping is a borderline risky chore that can go yous banned from some sites, so you dont desire to get your personal IP banned, user a virtual server for scrapping. Go 1 here from digital ocean (opens new window)

# Pace 1 - Download Chrome

Update your packages.

Download and install chrome

If yous get 'wget' command not found, that means you practice not have wget installed on your machine. Only install information technology past running:

And then yous tin can install chrome from the downloaded file.

Cheque Chrome is installed correctly.

This version is of import, you will need it to go the chromedriver.

# Step 2 - Install Chromedriver

You can download the chromedriver from this location Download Chromedriver (opens new window) Only you need the correct version, so remember which version of chrome yous have from step one in a higher place and download the correct chromedriver.

In my case, I had version 92.20.xxx.xx.xx. So I need to click on the version that supports 92. Install the correct chromedriver

Click on the link, and it volition take you to this page. Download the version that is best suited for your operating system, for me (Running Ubuntu 20.04 on Digital Ocean VPS) - the correct version is chromedriver_linux64.zero. You need to correct-click on the link and copy link. Install the correct chromedriver

Download the chromedriver in your VPS, make sure you replace this link with your link to match your vversion of chrome.

Y'all will become a nil file, you need to unzip it:

Make sure y'all unzip the file in your current directory, you can ls to copy and paste the correct file to unzip.

Y'all then need to move the file to the correct location, and so yous can find when yous need information technology.

# Step 3 - Examination Installation

Run the control

You should get feedback that chrome is working properly, but the best way to examination this is with python. The following code will bit google and return the title of the website. Create a python file and add the post-obit code:

Run the file - and y'all should get a impress out on the concluding of the website championship. Y'all are now fix to scrap websites.

Source: https://skolo.online/documents/webscrapping/

Posted by: belltheirturavid.blogspot.com

0 Response to "How To Install Chromedriver In Ubuntu"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel