Giter Site home page Giter Site logo

mmtscraper's Introduction

Mmtscraper (MakeMyTripScraper)

This Project is a offers scraper for makemytrip.com. This will scrape all the offers currently available at MakeMyTrip and store them into a workbook.

Packages used

  • Selenium

Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that.

documentation and further reading - Selenium.

  • BeautifulSoup

Beautiful Soup is a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide idiomatic ways of navigating, searching, and modifying the parse tree. and the best thing about bs4 is that it handles structurally or syntactically incorrect HTML code written for a web page

documentation - BeautifulSoup

  • requests

    Requests allows you to send organic, grass-fed HTTP/1.1 requests, without the need for manual labor.

    documentation - Requests

  • html-table-extractor

    HTML Table Extractor is a python library that uses [Beautiful Soup] to extract data from complicated and messy html tables.

    documentation - [html-table-extractor(https://pypi.org/project/html-table-extractor/)

  • openpyxl

    openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files.

    documentation - openpyxl

Usage

first of all clone this repo with:

git clone https://github.com/manasec/mmtscraper.git

then install required dependencies and libraries using:

pip install -r requirements.txt

And finally run the driver program from mmtscraper/ directory:

python main.py

Important notes:

  • flush/clear all the data of data.xlsx file everytime before running the package to avoid redundancy, this can be automated with a small code snippet but i will update it later
  • Firefox driver or IE can be used in place of chromedriver as per your preference
  • The offer directories and the html structure of the website may change in future.
  • The regex's used are not strict but does the work for now.
  • use rotating proxies and different user-agents to avoid getting blocked
  • I'm not responsible for any action/ban by makemytrip on anyone for scraping their website, use this tool at your own risk.

mmtscraper's People

Contributors

manasec avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.