Skip to content

Instantly share code, notes, and snippets.

Last active February 20, 2021 21:11
What would you like to do?
use strict;
use warnings;
use utf8;
use feature 'say';
use Furl;
use Mojo::DOM;
my ($http, $url, $results) = (Furl->new, '', []);
for my $count (1..1e6) {
my $content = $http->post($url, [], {u => $count})->content;
my $word = Mojo::DOM->new($content)->at('.result2 > div')->text;
$word =~ s/\n|\t| //g;
say $word;
push @$results, $word unless grep {$_ eq $word} @$results;
last if @$results >= 200;
open my $fh, '>', 'result.txt';
say $fh $_ for @$results;
close $fh;
=encoding utf8
=head1 NAME
=head1 USAGE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment