2 unstable releases

new 0.2.0 May 31, 2024
0.1.0 May 17, 2024

#8 in #scrape

Download history 239/week @ 2024-05-13 327/week @ 2024-05-20

566 downloads per month

MIT license

33KB
752 lines

simplygo

simplygo is an Rust SDK for programming interfacing with the Translink Simplygo site.

Features

  • SimplyGo client: login with credentials, scrape HTML from SimplyGo site.
  • parsing module: Parse scraped HTML from SimplyGo site into native rust structs.

Installation

cargo add simplygo

Usage

use simplygo::SimplyGo;
use simplygo::parsing::parse_trips;

let simplygo = SimplyGo::default().login(&args.username, &args.password);
let cards = simplygo.cards();
cards.iter().for_each(|card| {
    let html = simplygo.trips(card, NaiveDate::from_ymd(...), NaiveDate::from_ymd(...));
    let trips = parse_trips(&card.id, html)
});

License

MIT

Dependencies

~11–24MB
~359K SLoC