Skip to content

Instantly share code, notes, and snippets.

@paveljurca
Last active October 11, 2015 16:14
Show Gist options
  • Save paveljurca/fa3ff1c2c82348725b7d to your computer and use it in GitHub Desktop.
Save paveljurca/fa3ff1c2c82348725b7d to your computer and use it in GitHub Desktop.
"Create a Page" >> "Pages I Like" >> https://www.facebook.com/browse/fanned_pages/?id=
use v5.10;
use strict;
use warnings;
use open qw(:std :utf8);
# HTML source code
# grep 'fsl fwb fcb' -i facebook > facebook2
@ARGV = 'facebook2';
#
my @arr;
while (<>) {
chomp;
push @arr, split /<div class="fsm fwn fcg">/;
}
# page title
(m|([^>]+)</a></div>$|m
or m|([^>]+)<[^<]*</span></a></div>$|m)
and say $1 for @arr;
# page info
# /([^<]+)/ and say $1 for @arr;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment