I want a script to fetch data from a site irctc.co.in. here are the details
Booking of railway tickets in india is done online using a site irctc.co.in. it is a password protected site and users have to register before they can book a ticket. after they register they have to go to plan my journey link on the left panel. they then enter the source station and destination station and the date of journey for a given class (sleeper, 3 ac, 2 ac).
i have a list of important stations and want to get an insight of booking statistics for these stations. hence i want you to develop a script that would provide the source and destination stations and check the availaibility for the intermediate stations.
let me illustrate.
enter in from field "cstm"
enter in to field "nzm" (choose the first option from drop down)
enter a date in future (before 3 months from today)
select class as "sleeper class - sl"
click "find trains"
a list of trains is displayed - from the list pick first train "amritsar express", click "show availaibility" and "show route".
what i want the script to do is from show route to get the various intermediate stations like dadar(dr), thane(tna),etc. and to input these stations as destination keeping source as constant (first station) and to find the availaibility in the same train between the source station and the destination that you have inputted (dadar, thane ,etc).
for example the source station remains dadar and destination is thane for first case check availaibility in same train, next source station same i.e. dadar and destination kalyan and check availibility in same train.
this should be done for all the trains.
i hope that the problem statement is clear.
if in doubt post the queries on PMB.