Giter Site home page Giter Site logo

vikaspattathe / web-scraping-flipkart Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 1.0 7 KB

Web scraping an online shopping site in India (Flipkart) using BeautifulSoup in python.

Python 100.00%
webscraping scraping scraping-websites scraping-python webscraping-search python beautifulsoup beautiful-soup flipkart-scraper-python flipkart

web-scraping-flipkart's Introduction

Web-Scraping-Flipkart

Web scraping an online shopping site in India (Flipkart) using BeautifulSoup in python.

Python is used because it has a wide range of libraries to use for webscraping like BeautifulSoup, scrapy, etc,.

Now, if you know regular expressions, you might be thinking that you can write code using regular expression which can do the same thing for you. I definitely had this question. In my experience with BeautifulSoup and Regular expressions to do same thing I found out:

->Code written in BeautifulSoup is usually more robust than the one written using regular expressions. Codes written with regular expressions need to be altered with any changes in pages. Even BeautifulSoup needs that in some cases, it is just that BeautifulSoup is relatively better.

->Regular expressions are much faster than BeautifulSoup, usually by a factor of 100 in giving the same outcome.

So, it boils down to speed vs. robustness of the code and there is no universal winner here. If the information you are looking for can be extracted with simple regex statements, you should go ahead and use them. For almost any complex work, I usually recommend BeautifulSoup more than regex.I've used BeautifulSoup here.

Enter product u want to search on flipkart as input.

All the products in search results on the webpage of flipkart will be printed along with price and rating. Along with the output in the window, a file named "products.csv" will be created in the same folder as the program. It will contain the product name, price and rating of the each search result in a tabular manner.

I've attached products.csv file as an example for the search query "iphone" with this.

web-scraping-flipkart's People

Contributors

vikaspattathe avatar

Stargazers

 avatar

Forkers

smr341

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.