Skip to content

Instantly share code, notes, and snippets.

@xjackk xjackk/

Last active Nov 2, 2015
What would you like to do?
teamliquid top stream scraper
# TL stream scraper !
use strict;
use URI;
use LWP::Simple;
use Web::Scraper;
use Data::Dumper;
use Encode;
my $teamliquid = "";
my $content = scraper {
process "div#streams_content div", "streams[]" => scraper {
process "a.rightmenu", streamer => 'TEXT';
process "span.viewers", viewers => 'TEXT';
my $res = $content->scrape(URI->new($teamliquid));
#print Dumper($res);
print "\n\t Team Liquid Top Streamers \n\n";
print "\t ----------------------------\n\n";
for my $shit (@{$res->{streams}}) {
print "Streamer : " . $shit->{streamer} . "\t";
print "\t";
print "# of viewers : " . $shit->{viewers};
print "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.