Scraping Tabroom.com
Tabroom.com is the official(?) platform for Speech and Debate data. It's used to record all of the ballots and data for tournaments in the activity.
During my high school career, I developed TabroomAPI which scrapes the data from the website. I'll share some secrets I found out while developing the library.
Getting Started
The library is written in Kotlin, designed for Kotlin Multiplatform. This rule is arguable used the most:
internal const val ROW_SELECTOR = "tbody > tr"The library at its core just downloads HTML files, then uses JSoup (Java) or KSoup (Everything else), uses CSS query selectors to find the tags I need, and parses the data into classes.
I chose Kotlin for multiplatform & asynchronous reasons. Using launch {} is super useful and nice that I don't have to figure out how to transfer it across different platforms.