#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize::Firefox; use WWW::Mechanize; use DateTime; my ($firemech) = WWW::Mechanize::Firefox->new(); my $count; while($count++ < 2){ my $nick = ; chomp $nick; #my $j = 0; for my $j(0..3){ my ($date) = DateTime->now; my ($k) = 0; while($k < $j){ $date = $date->subtract( days => 7); $k++; } $date = $date->ymd; $firemech->get('about:blank'); my $url = "http://www.quakelive.com/#profile/matches/$nick/$date"; $firemech->get($url); die "Cannot connect to $url\n" if !$firemech->success(); my ($retries) = 10; while ($retries-- and ! $firemech->is_visible( xpath => '//*[@class="areaMapC"]', all => 1 )) { sleep 1; } die "Timeout" unless $retries; my ($content) = $firemech->content(); while(($content =~ /class="areaMapC" id="([^<]+)_([^<]+)_([^<]+)">/gsi)){ my ($game) = $1; my ($longid) = $2; my ($shortid) = $3; my ($matchid) = "$longid/$game/$shortid\n"; print $matchid; }; my @areaMapC = $firemech->selector('.areaMapC'); print $_->{id},"\n" for @areaMapC; #$j++; } } undef $firemech; __DATA__ peavey trajan komap bluedawg donpidon x9rcist dom_prova_____ newton burn tyryl st1mz tomo32 zky hisarrzulu _luk__47_ sendhu joopsta sand5pid3r trickle mikenoid beg1nner fladder72 4bsan1ty daitarn z0id0uf amoreno stuntt askkk flyttadig arcsign glavic acid_predator new_0 jala1 crucci niko95 deputydawg optixx ennesit martianbuddy b4r r1dah gathion function9 chup4 poocamshot shnipzr heppo b4byb34r the_hulk