A little bit of research on that site shows that getting the "top 10" is as easy as using the URL https://tranco-list.eu/download/K3VW/10. You can also register an account to customize the download even further.
use warnings; use strict; use HTTP::Tiny; use Text::CSV qw/csv/; # also install Text::CSV_XS for speed my $resp = HTTP::Tiny->new->get( 'https://tranco-list.eu/download/K3VW/10'); $resp->{success} or die "$resp->{status} $resp->{reason}\n"; my $topten = csv(in=>\$resp->{content}); use Data::Dump; dd $topten; __END__ [ [1, "google.com"], [2, "facebook.com"], [3, "youtube.com"], [4, "netflix.com"], [5, "microsoft.com"], [6, "twitter.com"], [7, "tmall.com"], [8, "instagram.com"], [9, "qq.com"], [10, "linkedin.com"], ]
In reply to Re: Fetch URL Contents to File Handle
by haukex
in thread Fetch URL Contents to File Handle
by grahjenk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |