Tuesday, March 8, 2016

Site Scrapping using Python - Cricbuzz

Hello friends ..

In this post i am going to tell you that how you can use python to extract data from any site.

In this case , i am going to take cricbuzz to extract data.

Before we are going into the coding part , we should understand the some libraries needed for this.

Requests - you can download from below link.

Download Requests

Beautiful Soup- you can download from below link.

Download Beautiful Soup



The r.content will get all the data of webpage( which is same as what we will able to see by looking the page source of any site ).

Soup.prettify will put the html data in proper format.

soup=BeautifulSoup(r.content) - in this line soup will all the data of the html page.

After that we will use the methods of soup class to find the pattern from the source.

In the above example , i have just shown the score of the two teams.

We can use python in the same way to scrap data from any site.

1 comment:

  1. Can you please help me with doing the same for commentary of cricbuzz?

    ReplyDelete