• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "Write a wrapper for these sodding Mixing Deck train things"

Collapse

  • NickFitz
    replied
    They predominantly use the National Rail Enquiries API (National Rail Enquiries - Developers) as far as I'm aware, though How a student used open data to beat national rail enquiries at its own game | News | The Guardian may be of interest.

    EDIT: although that 2012 story talks of NRE charging for their API, it looks like much of it is now available free for reasonable levels of consumption, judging by pages like National Rail Enquiries - Darwin Data Feeds
    Last edited by NickFitz; 7 June 2016, 19:43.

    Leave a comment:


  • d000hg
    replied
    Interesting. The one I most problems with is the GWR sleeper service to Penzance - only one train a day is a sleeper and you have to delve in to see what the sleeper prices are not just the regular ones. It's typically quite pricey so planning a trip around cheap tickets is good, but it takes flipping ages.

    If I could build a "find me the sleeper train prices every day this week" thingie it would be very handy.

    Leave a comment:


  • xoggoth
    replied
    Have in the past used URL2FILE, crude but simple. You just need to list the URLs you want to download in a .bat file. That assumes you know the URL names but just looked up East Grinstead to Victoria today at 19.45 and the URL is the site name plus:

    /service/timesandfares/EGR/VIC/today/1945/dep

    You can find a list of station abreviations here: National Rail Enquiries - Station Codes so looks easy enough to figure out.

    PS Aagh! Does not seem to be any wildcard feature in URL2FILW, so specifying time could be problem. Seems wget does though not tried it.
    http://gnuwin32.sourceforge.net/packages/wget.htm
    Last edited by xoggoth; 6 June 2016, 18:53.

    Leave a comment:


  • eek
    replied
    Originally posted by d000hg View Post
    I'm not a web-dev although I know enough to understand that However in the past when I've tried to do that sort of thing, it hasn't worked (maybe due to cookies or something as simple as using POST rather than GET might fox me!)

    A more robust solution would be preferred, I can do some digging but initially wondered if anyone else had ever looked into this - maybe nobody else finds it annoying like I do!
    The backend is a cobbled together system now managed by atos....

    Leave a comment:


  • d000hg
    replied
    I'm not a web-dev although I know enough to understand that However in the past when I've tried to do that sort of thing, it hasn't worked (maybe due to cookies or something as simple as using POST rather than GET might fox me!)

    A more robust solution would be preferred, I can do some digging but initially wondered if anyone else had ever looked into this - maybe nobody else finds it annoying like I do!

    Leave a comment:


  • eek
    replied
    Surely it's just Ajax calls. Just run developer tools in your browser and slurp the queries

    Leave a comment:


  • Write a wrapper for these sodding Mixing Deck train things

    Most of the train operators seem to use very similar "mixing deck" tools to show you trains and prices - so much so I imagine they are using a turnkey solution or something along those lines.

    They're generally useful if you want a specific train/day but for scouting a range of dates to find the best prices when you're flexible it's a PITA especially that when you change the from/to date, it reloads both from/return panels every time.

    I wonder if there is an API I could query to get all this data upfront and then page through as I see fit, instead of having to do page reloads all the time. Anyone know anything about it?

Working...
X