All pastes #169538 Raw Edit

Unnamed

public python v1 · immutable
·published 2006-09-13 23:51 UTC
rendered paste body
def replaceOne(args):    return (args * 1) + (args == 0)def Galleries(fromGallery, page='0'):    in_gallery = re.compile('"(photogallery.*?|/gallery/.*?)"><img src="(.*?jpg)"')    in_pgLeft  = re.compile('There are.*?>(.*?) more</a>')        Gallery   = []    GalInfo   = []    imgLeft   = []    pgLeft    = []    for a in in_gallery.findall(fromGallery):        Gallery.append(a[0])        imgLeft.append(urllib.urlopen(url + a[0]).read())    for a in imgLeft:        pgLeft.append(in_pgLeft.findall(a))    for a in pgLeft:        GalInfo = int(str(a)[2:-2]) / 12    newList = map(replaceOne, GalInfo)