use scraper::{Html,Selector};
use url::Url;
use tokio::sync::mpsc::{self, Sender}; //, Receiver};
const WORKERS : usize = 8;
type SiteStat = (Url, Vec);
#[tokio::main]
async fn main() -> Result<(), Box> {
let addr = std::env::args().nth(1)
.unwrap_or_else(|| "https://www.tmplab.org".to_string());
let links = get_links(addr.as_ref()).await?;
let addr = Url::parse(addr.as_ref())?;
let mut links : Vec = links.into_iter()
.filter(| url | url.host() != addr.host())
.collect();
let (tx, mut rx) = mpsc::channel(32);
// spawn a pool of workers
let mut workers : Vec