PastaSource / Slowly_Letter_Downloader

Automates the process of downloading letters from slowly in PDF form.
GNU General Public License v3.0
2 stars 0 forks source link

Replace cefpython #33

Open PastaSource opened 2 years ago

PastaSource commented 2 years ago

I'm not sure which direction to take on this, as cefpythons only role in the program is to scan the QR code on the Slowly website, store the cache files, then destroy itself. Considering most the space in the released .zip is cefpython, this really isn't ideal. Right now the only idea I have on mind is to use Selenium (which we already are using for printing) somehow. The issue is we're running Selenium is a purely headless mode, so we'd need multiple instances of Selenium, which is probably better than having 100mb(ish) dedicated for cefpython. My only concern is that we probably wouldn't be able to integrate Selenium into a frame on Tkinter. I don't really want to have a window popup for the QR code to be scanned, then to disappear. I wonder if we could have Selenium generate the QR code in headless mode, and then present the QR code to the user in a frame, either by extracting the image, or saving a PDF and printing it into the frame.

Other than Selenium, I don't know of any other modules we could use to achieve the same thing as cefpython. Though I'll probably research this at some point.