3
jestdotty
12h

ye ok so officially rust doesn't have a headless browser I can use

there is two.

one will randomly just throw errors totally randomly at you, about some event not coming back or the connection being closed. which means every single unwrap for every single "wait for this element to exist on the page" or trying to access an element is literally a blow-up minefield

the repo is filled with small issue tickets like how the docs keep pointing to 404 pages but I worked around that by just brute forcing everything with debug logging (despite data types being missing / not where they should be in return objects...)

and then there's apparently whatever selenium driver is and that has half as many stars and even worse sounding issue tickets and I already spent 6 hours writing code that took me 20 minutes to write in JavaScript like 8 months ago so I think I don't want to write another stupid headless browser script for it to be utterly useless

I guess I could just have loops and potentially caching. so if it has a mysterious event or connection error, try again! that's literally what I did with fucking reqwest. I don't even know why that nonsense is broken. I have thousands of proxy'ed network connections going and some of them randomly hang and I'm reasonably sure it's reqwest just not cleaning something up

I really wonder if rust people have brain aids. they wanted it to be safe so they just don't get safety exercises in for their brains, and do nonsense like this where they can't go from level 0 safety brain to ohno now I have to do networking and turns out that's extremely error-prone and needs brain-can-account-for-safety-9000 level and they just can't do it because no brain exercises make them all smooth and not wrinkly like everyone else gets in the skull jello by actually using the brain jello

Comments
Add Comment