Skip to content

Instantly share code, notes, and snippets.

@gkbrk gkbrk/
Created Apr 11, 2016

What would you like to do?
Serie tracker
#!/usr/bin/env perl
use strict;
use warnings;
use HTTP::Tiny;
sub http_get {
my $http = HTTP::Tiny->new;
return $http->get($_[0])->{content};
my @series;
my $html = http_get "";
while ($html =~ /alt="(.*) (.*)\. Sezon (.*)\. Bölüm" class="avatar" width=40\>/g) {
push(@series, $1." Season ".$2." Episode ".$3);
my @favorites = ("arrow", "flash", "legends of tommorrow", "grimm", "limitless",
"izombie", "magicians", "person of interest", "daredevil");
foreach my $episode (@series) {
print "\033[0m"; # white
foreach my $fav (@favorites) {
if ($episode =~ /$fav/i) {
print "\033[93m"; # yellow
print "---> ";
print $episode, "\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.