feat(server): templating for cluster map is almost done (cluster hardcoded)

This commit is contained in:
Maieul BOYER 2026-02-20 18:42:45 +01:00
parent ac98af1428
commit 5e0a9ded04
Signed by: maix
SSH key fingerprint: SHA256:iqCzqFFF5KjRixmDExqbAltCIj9ndlBWIGJf3t9Ln9g
6 changed files with 173 additions and 5 deletions

View file

@ -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)
}
}