A web crawler in C++ which takes as input two cities and shows bus schedule between them.
It sends request to travelyaari.com and stores the response in Redis cache.
It can be used in the following two modes:
- A command line interface and,
- A webapp using codeIgniter MVC framework
- crawl_cli.cpp - for command line interface.
- crawl_server.cpp - server for codeIgnitor MVC framework
-
First install Redis server using the following command:
sudo apt-get install redis-server -
Clone this repository:
git clone https://github.com/prashkr/slink.git -
Run
make install -
Run
make compile
-
Start redis server by typing
redis-serveron terminal. -
For command line interface
./crawl_cli <source_city> <destination_city>
e.g. ./crawl_cli Delhi Mumbai -
For Webapp
- Copy codeIgnitor into your server folder so you can access the webapp on
http://localhost
If you don't have a server running then you can use php to create a server
cd CodeIgniter-3.0.0
Run "php -S 127.0.0.1:80"
Now you can see the webapp on http://localhost - Run
./crawl_serverso that server starts listening for request from Webapp.
- Copy codeIgnitor into your server folder so you can access the webapp on