#map images won't load when going to openfront.io/maps/{map_name}/thumbnail.webp

1 messages · Page 1 of 1 (latest)

stiff isle
#

heres the specific code i am running:

``def get_map_thumbnail(self, map_name: str) -> str:
if not map_name:
return f"https://openfront.io/images/GameplayScreenshot.png"

    # Lowercase and remove spaces, dots, and parentheses
    normalized_map = re.sub(r'[\s.()]+', '', map_name.lower())
    
    if normalized_map:
        encoded_map = urllib.parse.quote(normalized_map)
        return f"https://openfront.io/maps/{encoded_map}/thumbnail.webp"
        
    return f"https://openfront.io/images/GameplayScreenshot.png"``

like i said, if its just the way that im doing it, my bad (i converted deshack's ts to py)

iron tide
#

i think the links changed in v31

stiff isle
#

oh shit

#

but sometimes they work

#

like the images show up sometimes

iron tide
stiff isle
#

yeah ik but look

iron tide
#

yeah no idea why some do load

stiff isle
#

i thought it was some sort of api limit type thing

iron tide
#

i helped des fix the bot yesterday

stiff isle
#

but i put a long ass wait and it didnt work

#

how tf would i even make it work now 😭

#

cause i saw that the links changed when i checked as well

#

but when i cloned the github it just defaulted to the same link i was using before so i thought it still worked anyways

iron tide
#

ask des himself 😭 theres probably an easy to way to extract all the new links of the thumbnails

stiff isle
#

yeah prob the best idea

iron tide
#

or you could somehow get them from the repository?

stiff isle
#

first thing i tried was legit downloading all the maps into a file 😂

#

but it was too prone to not working when the game updates

#

eh it aitn a big deal

#

@iron tide yeah he used the github