Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

dumpstersluts site rip script

Name: Anonymous 2006-10-15 23:37

# -*- python -*-

import os
import sys
import urllib
import urlparse

import BeautifulSoup

# start_url = 'http://forum.dumpstersluts.com/showthread.php?t=29656&page=2';
start_url = sys.argv[1]

html = unicode(urllib.urlopen(start_url).read(), 'ascii', 'replace')
bs = BeautifulSoup.BeautifulSoup(html)

print 'Starting:', start_url

a_tags = [X for X in bs('a')
          if X.has_key('href') and 'imagebeaver' in X['href']]

for a_tag in a_tags:

    href = a_tag['href']
    if href.endswith('jpg'):
        print 'Fetching:', href
        fn = os.path.split(urlparse.urlsplit(href)[2])[1]
        file(fn, 'w').write(urllib.urlopen(href).read())
        continue

    html = urllib.urlopen(href).read()
    imbs = BeautifulSoup.BeautifulSoup(html)
    imgs = [X for X in imbs('img')
            if X.has_key('id') and 'thepic' in X['id']]
    src = imgs[0]['src']
    print 'Fetching:', src
    fn = os.path.split(urlparse.urlsplit(src)[2])[1]
    file(fn, 'w').write(urllib.urlopen(src).read())

Name: Anonymous 2006-10-15 23:57

I was going to yell at you for being an idiot, but that link is actually not too bad.

Name: Anonymous 2006-10-16 5:34

-*- faggotry -*-

Name: Anonymous 2006-10-16 8:38

Starting: http://forum.dumpstersluts.com/showthread.php?t=29656&page=2
Traceback (most recent call last):
  File "dumpster2.py", line 34, in ?
    src = imgs[0]['src']
IndexError: list index out of range

Name: Anonymous 2006-10-16 9:00

Argh, clicking stupid shit at work

Name: Anonymous 2009-01-14 13:33

lol sepples

Name: Anonymous 2009-08-17 0:38

Lain.

Name: Sgt.Kabu髋뻙kiman沧뵚 2012-05-28 20:43

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List