Giter Club home page Giter Club logo

crawl-agoda's Introduction

Big Data For Tourism Statistics : Crawling Agoda

As part of the drive towards innovation and exploiting new sources of data, we are currently analyzing alternative sources of data for accommodation statistics using web scraping technique. Web scraping is defined as an automated procedure of extracting relevant items of information from websites and turning it into structured information that can be used for following analysis.

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

List of Requirement for the project:

  1. OS Windows 7 or higher.
  2. Python 2.7 (Recommended using Anaconda Navigator)
  3. Google Chrome Browser with the driver
  4. Mozilla Firefox Browser with the driver
  5. Python Library (Pandas, Selenium, Joblib)

Script to install the Python Library:

conda install pandas
conda install -c conda-forge selenium
conda install -c anaconda joblib

Running The Script & Start The Robots

First step to do is to install the requirement for the project. We recommend to use Anaconda Navigator to install the python environment in the OS Windows.

Next, open the script agoda_build_directory.py and change the script in the configuration section to match the settings that should be on your computer. For example :

...
firefox_driver_path = 'YOUR DRIVER PATH' #setup the path of gecko driver

city_code = '17193' #agoda city code 17193 for Bali, Indonesia
cIn = '2018-07-08' #set the default check-in date
cOut = '2018-07-09' #set the default check-out date
output_path = "resBALI_"+cIn+".xlsx"
...

After that, run the script and wait until the process is complete. The agoda_build_directory.py will generate accomodation directory as the crawling results from agoda with basic information (links, hotel name, star rating, and score). This directory, will be used to get more information from every hotel page, like remaining rooms available, year opened, etc.

To access every hotel page links that have been available in the crawling directory, we used the agoda_parallel_bali.py. Configure the script first, then run the script in daily basis to capture the information about remaining rooms available everyday. To make it easy, we can configure the task scheduler to run agoda_parallel_bali.py automatically.

Tutorial to setup the task scheduler can be seen on the following page: https://stackoverflow.com/questions/44727232/scheduling-a-py-file-on-task-scheduler-in-windows-10

Note* : Stable Internet Access is very necessary in order to make the crawling process run without any obstacle.

Authors

  • Amanda Pratama Putra
  • Heny Wulandari

License

This project is licensed under the MIT License - see the LICENSE.md file for details

crawl-agoda's People

Contributors

mandes95 avatar

Stargazers

Fajar Satria avatar Monomadic avatar Coolshan avatar Edward avatar  avatar

Watchers

James Cloos avatar  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.