Oh Snap!

Please turnoff your ad blocking mode for viewing your site content

Jane Alam

Web Developer & Designer, Code Analyzer & Bug Fixer

How to scrap website data in python using BeautifulSoup | Part 1

/
/
/
90 Views

Scrap website data in python using BeautifulSoup from bs4

Lets prepare files, folder and python packages for this project. For this project we use http://janealam.com for scraping data.

Our application folder name "scrapdata"

scrapdata
-------app.py

Python version : 3.6.2
Python Packages: requests, bs4

Let's install our packages first. Open Terminal or Command Prompt and type following command.

$ pip install requests
$ pip install bs4

After successful installation we open our "app.py" in Code Editor.

Let's import our packages for scrap app.

#app.py

import requests
from bs4 import BeautifulSoup

data_url = requests.get('http://janealam.com')
page = data_url.content
soup = BeautifulSoup(page, 'html.parser')

Leave a Comment

Your email address will not be published. Required fields are marked *