RaphaelDDL/e7db-api

Heroes' full image preview

Opened this issue ยท 5 comments

Visualize the hero full body instead of a cropped one inside of assets field when I send a request in /hero/{id} or /hero.

Hi there ๐Ÿ‘

So, the full body is animated. There's no static full body image in game's assets which is what we use.. We did use reddit's user WarkoalkA full body edits from a long time ago ( e.g. https://assets.epicsevendb.com/herofull/baiken.png ) but it's missing a lot of heroes and I believe he stopped editing so that's why I did not add the url as is not reliable..

Unfortunately I haven't break down the animation and to be truth, I stopped after e7herder made it. Of course would be great to E7DB but too complicated atm, and the creator doesn't want to opensource the code.

A "fix" would be go hero by hero in it (You can see them in model viewer), set the normal face and use the "export as PNG" option, but it would be manual work and I prefer spending free time coding new stuff for the UI and API instead ( e.g. I just released the PVP Ranking right now xD https://epicsevendb.com/ranking ).

If you'd like to contribute by doing this I explained and sending me the zip with the images, it would be cool. And then it would be simpler for me having to update one-two hero(es) per new patch when it comes. Otherwise, adding the fullbody url to the api where most will give 404 won't be good.

A "fix" would be go hero by hero in it (You can see them in model viewer), set the normal face and use the "export as PNG" option, but it would be manual work

Why not use a web scrapper instead? With selenium it would be possible to scrap the character page to get the url to find each character id and then use the model viewer and download the images from there. I made a small prototype with the UI version of selenium to show the potential with Angelica but I don't think it would take much time to add the character id scrapping part and download everything in no time.

Edit: Well in th end I ended up doing it myself and added the images + code of the crapper there https://github.com/Gabriel123N/E7HerderScrapper

from selenium import webdriver

DRIVER_PATH=r"<PATH TO CHROME DRIVER>"
options = webdriver.ChromeOptions()
options.add_experimental_option("prefs", {
  "download.default_directory": r"<PATH TO DOWNLOAD FOLDER>",
  "download.prompt_for_download": False,
  "download.directory_upgrade": True
})
driver = webdriver.Chrome(executable_path=DRIVER_PATH,options=options)
driver.get('https://e7herder.com/tools/model-viewer#type=5,id=c1062') #Angelica id
filter = driver.find_elements_by_css_selector('.filter > div.item')
for face in filter:
    face.click()
    content = driver.find_elements_by_css_selector('span.link.small')
    for ele in content:
        if 'Image' in ele.text:
            ele.click()

hmm I never worked with selenium but I'll check it out, seems doable ๐Ÿ‘

Just a small heads-up about scrapping E7herder. It appears that this page https://e7herder.com/search/heroes does not contains every hero that has their model in the model viewer (an example would be Sinful Angelica). So you would still need to do some manual work to some extend to get those heroes images and possibly skins.

However, you already remove 172 herroes that are done automically with the heroes page making it much less time consuming.

Oh yes, herder said he would only manually update the model viewer (since that's the only thing in the website noone has) but wouldn't update the rest since he didn't have time to find the key to the dbs again.

I'll just use my own hero list :P