OZONE Asylum
Forums
Mad Scientists' Laboratory
An expert moderation system?
This page's ID:
27817
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
[code] import urllib2 url = "http://www.ozoneasylum.com/the%20sink" request = urllib2.urlopen ( url ) page = request.read() page = page [ page.find ( '<th width="115" colspan="2">Latest Post</th>' ) : page.find ( '<a name="belowFirstTable">') ] import re #might have to twiddle with this. #The Python Regexps Module is always giving me backtalk urls = re.findall ( "(http://www.ozoneasylum.com[0-9]+)", page ) for x in urls: filename = re.findall ( "[0-9]+", x ) [ 0 ] + '.html' request = urllib2.urlopen ( x ) fileHandle = open ( "b:/" + filename , 'wb' ) fileHandle.write ( request.read () ) fileHandle.close () [/code]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »