Archived
1
0
Fork 0
forked from Anri/cal8tor
This commit is contained in:
Mylloon 2022-08-15 14:52:57 +02:00
parent e33fed34a3
commit 918431b731
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 5 additions and 4 deletions

View file

@ -1,9 +1,8 @@
mod timetable;
mod info; mod info;
mod timetable;
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
let _timetable = timetable::timetable(3, 1, None).await; let _timetable = timetable::timetable(3, 1, None).await;
let _info = info::info().await; let _info = info::info().await;

View file

@ -1,9 +1,11 @@
use scraper::{Selector, Html}; use scraper::{Html, Selector};
mod models; mod models;
pub async fn timetable(year: i8, semester: i8, letter: Option<char>) -> Vec<models::Day> { pub async fn timetable(year: i8, semester: i8, letter: Option<char>) -> Vec<models::Day> {
let document = get_webpage(year, semester, letter).await.expect("Can't reach timetable website."); let document = get_webpage(year, semester, letter)
.await
.expect("Can't reach timetable website.");
// Selectors // Selectors
let sel_table = Selector::parse("table").unwrap(); let sel_table = Selector::parse("table").unwrap();