Habbo Asset Updater - Python

Status
Not open for further replies.

Synapse

PogChamp
Mar 3, 2012
164
59
Hello,

After seeing many hotels struggling to update their clothing themselves, I decided to create a tool which grabs all of the latest clothing from Habbo. But, I decided I shouldn't stop there. With this tool you will be able to import your current figuremap to allow the tool to only download the ones you don't have! But wait it gets better, you know those annoying XML snippets you have to add one by one? Well, this tool will generate the XML needed for the clothing you downloaded!

The current alpha/proof of concept version can be seen at , however this is still considered to be a prereleased version. And is very poorly implemented.

Habbo Asset Updater
Features:
  • Download all of Habbo's latest clothing
  • Generate XML for only the clothing you need
  • Choose your export path

Might be added:

  • Download badges, and generate the respective text
  • Download furniture and generate SQL queries for them
  • Download latest hotelview imagary
  • Maybe more?

See it in action:
mdMthLG.gif
Code snippets:
Excerpt from main.py
Code:
def getExternal(id):
    global lines
 
    # Check if external variables is cached if not, make a request
    try:
        lines
    except:
        externalVars = makeRequest("https://www.habbo.com/gamedata/external_variables/0")
        lines = externalVars.splitlines()

    for line in lines:
        if line.startswith(id.encode()):
            line = line.decode("utf-8")
            line = line.replace(id+"=", "")
            if line.startswith("${url.prefix}"):
                line = line.replace("${url.prefix}", "https://habbo.com")
            if not line.startswith("http"):
                line = "https:"+line
            return line

def clothingList():
    global production
    clothingItems = []
    figureData = makeRequest(production+"figuremap.xml")
    figureData = BeautifulSoup(figureData, "html.parser")
    for lib in figureData.find_all("lib", id=True):
        clothingItems.append(production+lib['id']+".swf")
    return clothingItems

 
production = getExternal("flash.client.url")

def worker():
    while True:
        item = q.get()
        print(Req.download(item))
        q.task_done()

q = Queue()
for i in range(14):
     t = Thread(target=worker)
     t.daemon = True
     t.start()

def run():
    clothes = clothingList()
    for cloth in clothes:
        q.put(cloth)  
    del clothes
Excerpt from Req.py (still a bit rough)
Code:
def download(url, extention=False):
        if Req.validUrl(url):
     
            filename = url.split('/')[-1]
            if extention == False:
                if "." in filename:
                    extention = filename.split('.')[1]
                else:
                    return ["error", "ERROR(004): No extention specified."]
            else:
                filename = filename+"."+extention
     
            if not Req.fileExists(filename):
                extentions = ["swf", "png", "gif"]
                if extention in extentions:   
                    r = scraper.get(url, stream=True, headers=headers)
                    with open(filename, 'wb') as f:
                        shutil.copyfileobj(r.raw, f)
                    return filename
                else:
                    return ["error", "ERROR(003): '{}' is an invalid, or unsupported extention. ({})".format(extention, url)]
            else:
                return ["error", "{}, seems to already exist.".format(filename)]
        else:
            return ["error", "ERROR(001): '{}' appears to be an invalid url. ".format(url)]
 
Last edited:

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
Everyone is saying how life saving it is but forgets dozens of tools like this have been existent for years. If you want to make it helpful for the beginners then make it a web based project so that they can enter in their hotel URL and it’ll give them back a zip that does all of the above

(Python isn’t very user friendly, let alone a CMD based app)
 

Synapse

PogChamp
Mar 3, 2012
164
59
Everyone is saying how life saving it is but forgets dozens of tools like this have been existent for years. If you want to make it helpful for the beginners then make it a web based project so that they can enter in their hotel URL and it’ll give them back a zip that does all of the above

(Python isn’t very user friendly, let alone a CMD based app)
While I've considered this, a web-based project isn't as feasible. And it's not what I'm currently learning. I'm making this for myself. Figured I'd be kind enough to release it.

And I agree. It's not noob friendly. It isn't meant to replace all the work. It's just meant to automate the more tedious part.

Might not be impressive to you, might have been done, might have been this or that. At the end of the day this will save people time. That's all I care about.

And yeah I've seen this tool made before and it's pretty easy to make with the libraries availble. However I haven't seen anyone go as far as dynamically generating the xml files. And I haven't seen it for clothes. The version I currently have will bypass cloudflare js verification page as well (probably not going to include this in release as too OP).

With released versions in the future I will simplify installation by including all prerequisites in the same package, and might even look into freezing it and turning it into an exe.
 
Last edited:

denialwtf

god complex
Apr 26, 2018
10
5
yer

Nice tool, but someone has done this in C# a few years back and it still works. Good job though!
Regardless if it's been made before, it's a nice tool, props to the creator, but i don't understand how people are saying its easy to use when you have to install modules, and most people can't - good job anyways.
 
Status
Not open for further replies.

Users who are viewing this thread

Top