site_icons icon indicating copy to clipboard operation
site_icons copied to clipboard

load_website hangs indefinitely

Open mpra opened this issue 2 years ago • 0 comments

I encountered a problem while evaluating this library. While it works for most sites/URLs, I ran into a case where it just hangs indefinitely. This happens when trying with the URL "https://developers.google.com/search/blog/". The small sample below never completes(, at least not within 15 minutes).

use site_icons::SiteIcons;

#[tokio::main]
async fn main() {
    let mut icons = SiteIcons::new();
    // scrape the icons from a url
    let entries = icons
        .load_website("https://developers.google.com/search/blog/", false).await
        .unwrap();

    // entries are sorted from highest to lowest resolution
    for icon in entries {
        println!("{:?}", icon);
    }
}

mpra avatar Nov 08 '23 13:11 mpra