Skip to content
Buy parking permits for the Orinda BART parking lot programmatically.
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
src/main/java
.gitignore
BART.gif
LICENSE
Permitter.iml
README.md
exclude.xml
geckodriver
pom.xml

README.md

Permitter

GitHub Stars GitHub closed issues Twitter license cat


Introduction

Parking permits for the Orinda BART parking lot sell out sixty days in advance, by 7:00 AM. In early 2018, I developed Permitter on a now-retired MacBook Pro to automate parking-permit purchases for my wife. (I get to the lot at 6:50 AM and therefore don't need a permit.) Since that time, I have run Permitter daily on my Windows PC using Task Scheduler. Five days a week, new permits magically appear in her Select-a-Spot account.

The Permitter stack includes Java, IntelliJ, Selenium WebDriver, and Firefox. I used Katalon Automation Recorder to observe interactions with the parking-website DOM. I strongly endorse that product.

Enjoy a video of Permitter in action.

Use

Permitter requires a credentials file called credentials. This file should have a BART-parking username and password with the format username,password.

Permitter can exclude holidays and vacations from purchase. See exclude.xml for how.

Permitter's repo has the MacOS Firefox Selenium WebDriver, geckodriver, but for other operating systems or browsers, use the appropriate driver.

If you are running on Windows, replace the string geckodriver in Permitter.java with geckodriver.exe.

As of April 6, 2019, Permitter is known to work with the following versions:

  • IntelliJ IDEA: 2019.1
  • JDK: 8, Update 201
  • Selenium WebDriver for Java: 3.141.59
  • geckodriver: 0.24.0
  • MacOS: 10.14.4
  • Windows: 10.0.17763.404
  • Firefox: 66.0.2

Technical Notes

Permitter.java has the main method.

The Safari and Chrome Selenium WebDrivers did not work for me, which is why I used the Firefox Selenium WebDriver. YMMV.

In my initial efforts to solve the purchasing problem, I tried Permitter, a Ruby app. I ultimately decided to implement something else because I am not fond of Ruby's syntax. That said, I thank Permitter's developer, Jeff Kowalski, for demonstrating that this automation is possible.

As a Swift developer, I was inclined to use WKZombie, but I could not get forms to work, perhaps because of this issue.

Future Plans

The credentials-reading code assumes that the credentials do not contain a comma. If my wife's credentials ever gain a comma, I might use XML for the credentials file, which would allow a comma.

Results of attempts to purchase permits currently go to a log file. Successfully purchased permits are also stored in BART's backend. For more-timely notice of results, however, I would like to send a push notification.

You can’t perform that action at this time.