SomethingAwful::Forums
use Modern::Perl;
use SomethingAwful::Forums;
use Data::Dumper;
my $SA = SomethingAwful::Forums->new;
$SA->login(
'username' => 'something',
'password' => 'awful',
);
my $scraped_thread = $SA->fetch_posts(
thread_id => 3343753,
pages => 1,
);
# view the data structure
say Dumper( $scraped_thread );
$SA->reply_to_thread( thread_id => 3343753, 'gas' );
Scrape and post to the forums.SomethingAwful.com forums.
See /examples folder.
# install everything needed by the SomethingAwful::Forums module + examples
cpanm --with-recommends git://github.com/ugexe/SomethingAwful--Forums.git
Web::Scraper scraper for scraping forum's index page.
Web::Scraper for scraping a specific forum.
Web::Scraper for scraping specific thread.
Contains the URL of the forum index. Allows use of an IP address if DNS fails to resolve.
WWW::Mechanize object used internally to navigate web pages.
Returns 1 if it successfully logged in.
$SA->login( username => $username, password => $password )
Login to forums using passed credentials.
$SA->reply_to_thread( thread_id => $thread_id, body => $body )
Reply to a specific thread
$SA->reply_to_post( post_id => $post_id, body => $body )
Reply to a specific post.
$SA->fetch_forums
Return a hashref representing the scraped forum index.
$SA->fetch_threads( forum_id => $forum_id, pages => [1,2] )
Return a hashref repsenting the threads scraped from the supplied pages of the supplied forum id.
$SA->fetch_posts( thread_id => $forum_id, pages => [1,2] )
Return a hashref repsenting the posts scraped from the supplied pages of the supplied thread id.
ugexe
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.