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


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


Scrap website, python, BeautifulSoup

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')

Continue reading – part 2
How to scrap website data in python using BeautifulSoup | Part 2

Leave a Comment

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt
cpanel, python, flask-python, flask python