Is there anywhere to download the source code of 4chan/other image boards? I'd like to see it just out of curiosity and to possibly set one up for myself and friends.
Name:
Anonymous2008-10-30 12:46
>>69 sub get_thread($$){
my $self=shift;
my($thread)=@_;
my($err,$res)=$self->wget($self->link_thread($thread));
$err and return $err;
my $t;
while($res=~m!(
(?:
(?:
<(span) \s class="filesize">(?>.*?</blockquote>)
|
<img \s src="[^"]*" alt="File \s deleted\.">
)
(?:<span \s class="omittedposts">[^<]*</span>)?
)
|
(?:<table><tr><td \s nowrap \s class="doubledash">(?>.*?</blockquote></td></tr></table>))
)!gxs){
my($text,$type)=($1,$2);
if($type){
$self->troubles("two thread posts in one thread------$res------") and return
if $t;
$t=$self->parse_thread($text);
}else{
$self->troubles("posts without thread------$res------") and return
unless $t;