This is a JavaScript scraper that retrieves information on upcoming bus departures from the Arriva website.
- Make sure you have Node.js installed
- Clone the repository:
git clone https://github.com/urluur/arriva-scraper.git - Move to the directory:
cd arriva-scraper - Install dependancies:
npm i
- Run
scraper.jswith stations for arguments. Example:node scraper.js Koper Izola
If the station has multiple words, wrap it in double quotes.
- Run the server:
node scraper.js - Go to the homepage in browser:
localhost:3030
- Go to the demo website
- Enter valid names of departure and destination stations
- Click on a connection to see returns
Note
Demo website is significantly slower than running the server locally. You can try out the project on the demo website, but you might need to wait approximately one minute for the remote server to start.
Official website also shows past connections, which makes the website hard to navigate. Students take a lot of buses and have to plan commutes back. Instead of searching twice and scrolling down the page, this scraper does it for you. Thank me later, University of Primorska students.

