Python Web 1 min read

Introduction of web scrapping with Python

Jack Tiong
Jack Tiong
January 13, 2019

In this series of blog posts, we will introduce 2 methods to perform web scrapping with Python:

Method 1: Using requests and BeautifulSoup

This method is applicable for web page which having static or server side rendered content. However, this method is not applicable for web page that rendered by client side Javascript.

Method 2: Using Selenium and Geckodriver / Chromedriver

This method is applicable for all types of web pages like static, server side rendered and client side rendered content.

Implementation for Method 1:

First install python libraries requests and beautiful Soup 4 with command below:

pip install requests BeautifulSoup4

In this implementation, we will list out all blog posts’ title and author at byprogrammers.com

Implementation for Method 2:

For method 2, before you jump into the implementation, ensure you have install Geckodriver or Chromedriver in your environment.

And also please run command below in terminal to install selenium library to your environment:

pip install selenium

In this implementation, similar with method #1, we will list out all blog posts’ title and author at byprogrammers.com

For further details, please feel free to checkout my Github repo for this blog post.

Happy Coding ?!

Speed Up Your Workflow

Want the full source code ready to ship?

Explore our professionally coded React Native & Expo UI Kits, complete with screens, navigators, and theme support.

Browse All Templates

Related Tutorials

View All Tutorials →
Django

Django Installation in Windows

These are the steps to install Django in Windows environment. ** Important Notes ** Use Command Prompt instead of PowerShell. 1.Download and install Python. Remember to add Path to environment variable. 2. Download and install PIP. 3. Install a virtual environment. 4. Create a virtual environment for all Django projects. 5. Activate the virtual environment. […]

Jan 11, 2019 Read →
Excel

How to save retrieved SQL server result to excel with Python?

Prerequisites: Ensure you have Python 3 and SQL server install on your environment If you not sure how to retrieve data from SQL server with Python 3 and how to write data to excel file wtih Python 3, you are recommended to read through other blog posts below if you find difficulties to follow this […]

Dec 30, 2018 Read →
Excel

How to read / write and create excel easily with Python?

Prerequisites: Ensure you have Python 3 install at your environment In order to interact with excel file with python, we need to install openpyxl. Run command below in terminal / cmd to install the library. Script 1: Read excel file Create a simple excel file “sample1.xlsx” with content above and saved it in my project […]

Dec 26, 2018 Read →