สิ่งที่เป็นอย่างดี :: ฟอรัม
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' );ขูดและโพสต์ไปยังฟอรัมฟอรัม Somethingawful.com
ดู /ตัวอย่างโฟลเดอร์
# install everything needed by the SomethingAwful::Forums module + examples
cpanm --with-recommends git://github.com/ugexe/SomethingAwful--Forums.gitเว็บ :: มีดโกนมีดโกนสำหรับหน้าดัชนีของฟอรัมขูด
เว็บ :: มีดโกนสำหรับการขูดฟอรัมเฉพาะ
เว็บ :: มีดโกนสำหรับการขูดเธรดเฉพาะ
มี URL ของดัชนีฟอรัม อนุญาตให้ใช้ที่อยู่ IP หาก DNS ไม่สามารถแก้ไขได้
www :: mechanize วัตถุที่ใช้ภายในเพื่อนำทางหน้าเว็บ
ส่งคืน 1 หากเข้าสู่ระบบได้สำเร็จ
$SA->login( username => $username, password => $password )เข้าสู่ระบบฟอรัมโดยใช้ข้อมูลรับรองที่ผ่าน
$SA->reply_to_thread( thread_id => $thread_id, body => $body )ตอบกลับเธรดเฉพาะ
$SA->reply_to_post( post_id => $post_id, body => $body )ตอบกลับโพสต์เฉพาะ
$SA->fetch_forumsส่งคืนแฮชฟ์ที่เป็นตัวแทนของดัชนีฟอรัมที่ถูกคัดค้าน
$SA->fetch_threads( forum_id => $forum_id, pages => [1,2] )ส่งคืน hashref repsenting เธรดที่ถูกคัดลอกมาจากหน้าเว็บที่ให้มาของรหัสฟอรัมที่ให้มา
$SA->fetch_posts( thread_id => $forum_id, pages => [1,2] )ส่งคืน Hashref repsenting โพสต์ที่ถูกคัดลอกมาจากหน้าเว็บที่ให้มาของรหัสเธรดที่ให้มา
ugexe
ไลบรารีนี้เป็นซอฟต์แวร์ฟรีคุณสามารถแจกจ่ายใหม่และ/หรือแก้ไขภายใต้ข้อกำหนดเดียวกันกับ Perl เอง