feat(server): templating for cluster map is almost done (cluster hardcoded)
This commit is contained in:
parent
ac98af1428
commit
5e0a9ded04
6 changed files with 173 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use froxy_scrapper::{state::State, types::ClusterLocation};
|
||||
use froxy_scraper::{state::State, types::ClusterLocation};
|
||||
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
async fn main() {
|
||||
|
|
@ -10,12 +10,12 @@ async fn main() {
|
|||
|
||||
let text = res.text().await.unwrap();
|
||||
|
||||
let location = froxy_scrapper::parsing::get_cluster_location("F4", &text);
|
||||
let location = froxy_scraper::parsing::get_cluster_location("F4", &text);
|
||||
|
||||
for l in &location.locations {
|
||||
match &l.data {
|
||||
froxy_scrapper::types::ClusterLocationData::Empty => {}
|
||||
froxy_scrapper::types::ClusterLocationData::User {
|
||||
froxy_scraper::types::ClusterLocationData::Empty => {}
|
||||
froxy_scraper::types::ClusterLocationData::User {
|
||||
login,
|
||||
image,
|
||||
relation,
|
||||
|
|
@ -29,7 +29,7 @@ async fn main() {
|
|||
.unwrap_or_else(|| "NO IMAGE".to_string())
|
||||
)
|
||||
}
|
||||
froxy_scrapper::types::ClusterLocationData::Normal { status } => {
|
||||
froxy_scraper::types::ClusterLocationData::Normal { status } => {
|
||||
// eprintln!("[{:<10}] {status:?}", l.location)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue