-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Rayahhhmed/SC-1-ds
Sc 1 ds
- Loading branch information
Showing
4 changed files
with
137 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
mod url_invalid_error; | ||
mod scraper; | ||
mod url_invalid_error; | ||
|
||
|
||
|
||
pub use scraper::Scraper; | ||
pub use url_invalid_error::UrlInvalidError; | ||
pub use scraper::Scraper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
use spooderman::Scraper; | ||
|
||
|
||
#[tokio::main] | ||
async fn main() { | ||
let mut scraper = Scraper::new() | ||
.set_url("https://timetable.unsw.edu.au/2024/subjectSearch.html".to_string()); | ||
let mut scraper = | ||
Scraper::new().set_url("https://timetable.unsw.edu.au/2024/subjectSearch.html".to_string()); | ||
|
||
match scraper.run_scraper().await { | ||
Ok(_res) => {println!("Scraping successful!\n"); | ||
}, | ||
Ok(_res) => { | ||
println!("Scraping successful!\n"); | ||
} | ||
Err(e) => eprintln!("Error: {}", e), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
#[derive(Debug)] | ||
pub struct UrlInvalidError; | ||
|
||
|