Had a chance to use Helium [0], a wrapper around Selenium to make web automation easier, and well it did in fact do that. I was initially just going to use requests to pull the page [1] but the page (a yu-gi-oh decklist) does some JS nonsense that I needed to wait for before the elements I want showed up. With Helium I was able to load the page in a headless Firefox session, wait for the elements to show up and then iterate over all the elements in less then 5 lines of code.
The point of all this was to pull a bunch of card art which I then ran through a background remover [2] so I can potentially do cheap pepper's ghost holograms as an additional element to duels. As with AI generally we got some good results and some garbage, I suspect I can partially fix this with settings, but of particular interest I feel was the Mokey Mokey card which came out almost perfect.
Links




















