A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »Halo reach screenshot downloader

Author Topic: Halo reach screenshot downloader (1 messages, Page 1 of 1)
Moderators: Dennis

DEEhunter
Joined: Dec 16, 2006


Posted: May 7, 2010 09:20 AM    Msg. 1 of 1       
Made in python right before bed. It downloads your halo reach screenshot after you input your gamer tag. It will download them all automatically in the same directory you run the app.
Quick and dirty I know. I have a .net app version made that won't be released yet until I optimize its parsing. Until then, settle with this.


http://www.filedropper.com/dist

sauce
import urllib2
import re
from BeautifulSoup import BeautifulSoup
soup = BeautifulSoup
gt = raw_input("Tell me your gamertag: ").replace(" ","%20")
link = 'http://www.bungie.net/Stats/Reach/Screenshots.aspx?player='+gt
print "Loading page...\n"

page = urllib2.urlopen(link).read()

soup = BeautifulSoup(page)
files = soup.findAll(attrs={'class' : 'info'})
if len(files) > 0:
for w in files:
title = str(w.find(id=re.compile("title")).contents[0])
highres = w.find(id=re.compile("hiresLink"))['href']
print title
print "http://www.bungie.net"+highres
pic = urllib2.urlopen("http://www.bungie.net"+highres)
file = open(title+".jpg","wb")
file.write(pic.read())
file.close()
raw_input("Press Enter to exit")
if len(files) == 0:
print "no screenshots found"
raw_input("Press Enter to exit")

uses beautiful soup



I'll update this thread with the .net version.
Here is a picture of the current .net version. Halo 3 screenshots work perfectly, it's reach screenshots that require me to use a different form of parsing.

 

 
Previous Older Thread    Next newer Thread







Time: Fri January 20, 2023 10:18 PM 141 ms.
A Halo Maps Website