AI Art Downloader
An application to create and download art from the AI art maker Dream by WOMBO. I like using AI art as placeholders in my games but it was very time consuming to get something I liked with the variance of AI art, so I made this to do it in the background. It’s a Windows Forms App using Selenium WebDriver for automating the browser. At the bottom of this page there’s a YouTube video showing it in action, the rest of the page is an explanation.
When the browsers first open I set each Chrome to not ask to save each file and set the download directory. Then type in the prompt, select a style and wait a second before clicking create to get past any anti-botting systems.
Selenium can’t access the file browser that opens when clicking upload image. I had to use Windows Forms to set the foreground window to the file browser, send the file path and press enter. Changing the influence of the image changed the other button’s html which added a few lines of code.
If I searched for the save button's html before it was there the site would recognize my program as a bot and I couldn’t save the image. Which was confusing at first because none of the other buttons caused this, which game me an eureka moment; there are lots of other changes in the html when the save button appears. So I tried checking for the back button instead of the save button and it worked! If they fix that too then I’d probably have to switch to image recognition. Or sacrifice some speed and wait 40~ seconds after clicking create so I know that the save button exists.